diff options
author | Johannes Weiner <hannes@cmpxchg.org> | 2014-12-10 18:43:46 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-10 20:41:06 -0500 |
commit | 7d5e324573b0ffd7098ab880c82096ca29a11f7f (patch) | |
tree | 9847999e2b1efcab0a72425adff3d5b85d2947ad /mm/memcontrol.c | |
parent | dfe0e773d0258a4d7dfd763e1fda04aa27680b90 (diff) |
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/memcontrol.c')
-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, | |||
6157 | if (PageCgroupUsed(pc)) | 6157 | if (PageCgroupUsed(pc)) |
6158 | return; | 6158 | return; |
6159 | 6159 | ||
6160 | /* Re-entrant migration: old page already uncharged? */ | 6160 | /* |
6161 | * Swapcache readahead pages can get migrated before being | ||
6162 | * charged, and migration from compaction can happen to an | ||
6163 | * uncharged page when the PFN walker finds a page that | ||
6164 | * reclaim just put back on the LRU but has not released yet. | ||
6165 | */ | ||
6161 | pc = lookup_page_cgroup(oldpage); | 6166 | pc = lookup_page_cgroup(oldpage); |
6162 | if (!PageCgroupUsed(pc)) | 6167 | if (!PageCgroupUsed(pc)) |
6163 | return; | 6168 | return; |