mm,memory_hotplug: drop redundant hugepage_migration_supported check
authorOscar Salvador <osalvador@suse.de>
Tue, 14 May 2019 00:17:32 +0000 (17:17 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 14 May 2019 16:47:46 +0000 (09:47 -0700)
has_unmovable_pages() already checks whether the hugetlb page supports
migration, so all non-migratable hugetlb pages should have been caught
there.  Let us drop the check from scan_movable_pages() as is redundant.

Link: http://lkml.kernel.org/r/20190320152658.10855-3-osalvador@suse.de
Signed-off-by: Oscar Salvador <osalvador@suse.de>
Acked-by: Michal Hocko <mhocko@suse.com>
Reviewed-by: David Hildenbrand <david@redhat.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>
mm/memory_hotplug.c

index df41b467e020acd63def1b7ebd9c577e2fc37684..ed4e70c501e6d6d7676928581db77ade0b9e291b 100644 (file)
@@ -1341,8 +1341,7 @@ static unsigned long scan_movable_pages(unsigned long start, unsigned long end)
                if (!PageHuge(page))
                        continue;
                head = compound_head(page);
-               if (hugepage_migration_supported(page_hstate(head)) &&
-                   page_huge_active(head))
+               if (page_huge_active(head))
                        return pfn;
                skip = (1 << compound_order(head)) - (page - head);
                pfn += skip - 1;