]> Git Repo - linux.git/commitdiff
mm: migration of hugetlbfs page skip memcg
authorHugh Dickins <[email protected]>
Sat, 19 Sep 2020 04:20:06 +0000 (21:20 -0700)
committerLinus Torvalds <[email protected]>
Sat, 19 Sep 2020 20:13:38 +0000 (13:13 -0700)
hugetlbfs pages do not participate in memcg: so although they do find most
of migrate_page_states() useful, it would be better if they did not call
into mem_cgroup_migrate() - where Qian Cai reported that LTP's
move_pages12 triggers the warning in Alex Shi's prospective commit
"mm/memcg: warning on !memcg after readahead page charged".

Signed-off-by: Hugh Dickins <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Reviewed-by: Shakeel Butt <[email protected]>
Acked-by: Johannes Weiner <[email protected]>
Cc: Alex Shi <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Mike Kravetz <[email protected]>
Cc: Qian Cai <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
mm/migrate.c

index 941b89383cf3dec58a2fcfa7cca09559ddb4fc04..aecb1433cf3cc5c354624a77098a024f36b525a6 100644 (file)
@@ -668,7 +668,8 @@ void migrate_page_states(struct page *newpage, struct page *page)
 
        copy_page_owner(page, newpage);
 
-       mem_cgroup_migrate(page, newpage);
+       if (!PageHuge(page))
+               mem_cgroup_migrate(page, newpage);
 }
 EXPORT_SYMBOL(migrate_page_states);
 
This page took 0.057393 seconds and 4 git commands to generate.