diff options
author | KAMEZAWA Hiroyuki <[email protected]> | 2012-01-12 17:18:57 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2012-01-12 20:13:07 -0800 |
commit | 36b62ad539498d00c2d280a151abad5f7630fa73 (patch) | |
tree | 553409901df6210e4a698c1991f9d455199e098b /tools/perf/scripts/python/check-perf-trace.py | |
parent | dc67d50465f249bb357bf85b3ed1f642eb00130a (diff) |
memcg: simplify corner case handling of LRU.
This patch simplifies LRU handling of racy case (memcg+SwapCache). At
charging, SwapCache tend to be on LRU already. So, before overwriting
pc->mem_cgroup, the page must be removed from LRU and added to LRU
later.
This patch does
spin_lock(zone->lru_lock);
if (PageLRU(page))
remove from LRU
overwrite pc->mem_cgroup
if (PageLRU(page))
add to new LRU.
spin_unlock(zone->lru_lock);
And guarantee all pages are not on LRU at modifying pc->mem_cgroup.
This patch also unfies lru handling of replace_page_cache() and
swapin.
Signed-off-by: KAMEZAWA Hiroyuki <[email protected]>
Cc: Miklos Szeredi <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Acked-by: Johannes Weiner <[email protected]>
Cc: Ying Han <[email protected]>
Cc: Hugh Dickins <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/check-perf-trace.py')
0 files changed, 0 insertions, 0 deletions