mm/hugetlb: enable PUD level huge page migration
authorAnshuman Khandual <[email protected]>
Tue, 5 Mar 2019 23:43:48 +0000 (15:43 -0800)
committerLinus Torvalds <[email protected]>
Wed, 6 Mar 2019 05:07:15 +0000 (21:07 -0800)
Architectures like arm64 have PUD level HugeTLB pages for certain configs
(1GB huge page is PUD based on ARM64_4K_PAGES base page size) that can
be enabled for migration.  It can be achieved through checking for
PUD_SHIFT order based HugeTLB pages during migration.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Anshuman Khandual <[email protected]>
Reviewed-by: Naoya Horiguchi <[email protected]>
Reviewed-by: Steve Capper <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Cc: Catalin Marinas <[email protected]>
Cc: Michal Hocko <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
include/linux/hugetlb.h

index 1b858d795731f1783aaa06e90ede54a4d8e4e55e..70bcd897332342bf439606715a56761f0e9ae199 100644 (file)
@@ -497,7 +497,8 @@ static inline bool hugepage_migration_supported(struct hstate *h)
 {
 #ifdef CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION
        if ((huge_page_shift(h) == PMD_SHIFT) ||
-               (huge_page_shift(h) == PGDIR_SHIFT))
+               (huge_page_shift(h) == PUD_SHIFT) ||
+                       (huge_page_shift(h) == PGDIR_SHIFT))
                return true;
        else
                return false;