Skip to content

Commit

Permalink
mm: migration of hugetlbfs page skip memcg
Browse files Browse the repository at this point in the history
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 <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Shakeel Butt <shakeelb@google.com>
Acked-by: Johannes Weiner <hannes@cmpxch.org>
Cc: Alex Shi <alex.shi@linux.alibaba.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Qian Cai <cai@lca.pw>
Link: http://lkml.kernel.org/r/alpine.LSU.2.11.2008301359460.5954@eggly.anvils
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Hugh Dickins authored and Linus Torvalds committed Sep 19, 2020
1 parent 62fdb16 commit a333e3e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mm/migrate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit a333e3e

Please sign in to comment.