Files
linux/include/linux
Miaohe Lin e6be37b2e7 mm/huge_memory.c: add missing read-only THP checking in transparent_hugepage_enabled()
Since commit 99cb0dbd47 ("mm,thp: add read-only THP support for
(non-shmem) FS"), read-only THP file mapping is supported.  But it forgot
to add checking for it in transparent_hugepage_enabled().  To fix it, we
add checking for read-only THP file mapping and also introduce helper
transhuge_vma_enabled() to check whether thp is enabled for specified vma
to reduce duplicated code.  We rename transparent_hugepage_enabled to
transparent_hugepage_active to make the code easier to follow as suggested
by David Hildenbrand.

[linmiaohe@huawei.com: define transhuge_vma_enabled next to transhuge_vma_suitable]
  Link: https://lkml.kernel.org/r/20210514093007.4117906-1-linmiaohe@huawei.com

Link: https://lkml.kernel.org/r/20210511134857.1581273-4-linmiaohe@huawei.com
Fixes: 99cb0dbd47 ("mm,thp: add read-only THP support for (non-shmem) FS")
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Reviewed-by: Yang Shi <shy828301@gmail.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: "Aneesh Kumar K . V" <aneesh.kumar@linux.ibm.com>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Ralph Campbell <rcampbell@nvidia.com>
Cc: Rik van Riel <riel@surriel.com>
Cc: Song Liu <songliubraving@fb.com>
Cc: William Kucharski <william.kucharski@oracle.com>
Cc: Zi Yan <ziy@nvidia.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-06-30 20:47:26 -07:00
..
2021-02-02 00:16:57 +01:00
2020-12-09 19:26:02 -06:00
2021-01-23 14:57:21 +01:00
2021-05-18 17:24:52 +01:00
2021-05-06 19:24:11 -07:00
2021-04-14 16:30:30 +03:00
2021-05-08 21:49:48 -06:00
2020-09-21 15:00:40 -07:00
2020-12-02 09:46:55 -07:00
2021-01-24 14:27:17 +01:00
2021-02-26 09:41:03 -08:00
2021-04-08 16:04:20 -07:00
2021-05-24 12:45:26 -04:00
2021-05-24 12:45:26 -04:00
2021-04-08 16:04:20 -07:00
2021-04-08 16:04:20 -07:00
2021-01-21 14:06:00 -07:00
2021-05-06 19:24:11 -07:00
2021-04-19 13:13:26 -04:00
2021-01-18 14:26:51 +01:00
2021-03-22 03:57:39 +01:00
2021-02-08 12:28:07 +01:00
2020-12-10 12:42:59 -06:00
2021-04-12 15:04:23 +02:00
2021-03-30 22:37:06 +02:00
2020-11-16 16:31:41 +01:00
2021-06-29 10:53:48 -07:00
2020-11-16 15:20:01 +01:00
2020-11-16 08:14:30 -07:00
2021-02-11 13:24:44 -08:00
2020-12-02 22:10:35 -08:00
2021-04-30 11:20:40 -07:00
2020-11-23 14:16:55 +00:00
2021-06-29 10:53:48 -07:00
2020-09-16 08:54:53 -05:00
2020-11-24 16:47:48 +01:00
2021-03-22 04:23:14 +01:00
2021-04-05 22:39:38 -04:00
2020-12-15 16:19:31 +01:00
2021-01-21 16:16:10 +00:00
2021-02-26 09:41:02 -08:00
2021-02-26 09:41:03 -08:00
2020-09-04 09:25:20 -07:00
2021-06-29 10:53:53 -07:00
2021-04-08 16:04:20 -07:00
2021-01-04 11:42:21 -05:00
2021-04-06 08:34:39 +02:00
2021-02-17 13:17:49 -08:00
2021-04-21 10:24:41 -05:00
2021-02-26 09:40:59 -08:00
2021-02-03 19:05:50 +01:00
2020-08-31 12:52:33 -07:00
2020-10-18 09:27:10 -07:00
2021-01-24 14:27:17 +01:00
2021-01-24 14:27:20 +01:00
2021-06-29 10:53:52 -07:00
2021-03-06 12:40:22 +01:00
2021-02-26 09:41:03 -08:00
2020-12-03 11:20:52 +01:00
2020-08-18 17:06:15 +02:00
2021-03-17 14:16:15 -05:00
2021-01-16 23:19:26 +01:00
2021-03-22 02:45:52 +01:00
2021-03-18 12:58:27 -04:00
2020-12-10 16:17:15 +01:00
2020-12-10 10:45:36 +01:00
2020-09-26 22:55:05 -04:00
2021-06-29 10:53:49 -07:00
2021-03-19 04:58:25 +00:00
2021-03-25 17:39:33 -07:00
2020-10-30 21:57:04 +01:00
2021-01-06 16:24:59 -08:00
2021-03-10 09:34:06 +01:00
2021-04-15 10:32:17 +02:00
2021-02-13 17:17:53 +01:00
2021-03-30 17:06:49 -07:00
2020-11-09 18:39:36 +01:00
2021-04-26 22:55:12 +01:00
2020-09-10 14:03:31 -07:00
2021-04-09 16:00:00 +02:00
2020-08-19 14:13:20 +02:00
2021-01-21 16:16:10 +00:00
2021-03-22 15:02:14 +01:00
2021-06-24 19:40:53 -07:00
2021-02-09 12:15:07 +01:00
2021-01-21 14:06:00 -07:00
2021-04-16 15:31:02 -07:00
2021-03-30 13:42:33 -04:00
2021-01-24 14:27:17 +01:00
2021-02-08 22:58:55 +01:00