diff options
author | Johannes Weiner <hannes@cmpxchg.org> | 2014-12-10 15:43:46 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-10 17:41:06 -0800 |
commit | 7d5e324573b0ffd7098ab880c82096ca29a11f7f (patch) | |
tree | 9847999e2b1efcab0a72425adff3d5b85d2947ad /mm | |
parent | dfe0e773d0258a4d7dfd763e1fda04aa27680b90 (diff) | |
download | linux-7d5e324573b0ffd7098ab880c82096ca29a11f7f.tar.bz2 |
mm: memcontrol: clarify migration where old page is uncharged
Better explain re-entrant migration when compaction races with reclaim,
and also mention swapcache readahead pages as possible uncharged migration
sources.
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Hugh Dickins <hughd@google.com>
Acked-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memcontrol.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index b495f29d4746..a0ae64ca55bf 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -6157,7 +6157,12 @@ void mem_cgroup_migrate(struct page *oldpage, struct page *newpage, if (PageCgroupUsed(pc)) return; - /* Re-entrant migration: old page already uncharged? */ + /* + * Swapcache readahead pages can get migrated before being + * charged, and migration from compaction can happen to an + * uncharged page when the PFN walker finds a page that + * reclaim just put back on the LRU but has not released yet. + */ pc = lookup_page_cgroup(oldpage); if (!PageCgroupUsed(pc)) return; |