KAMEZAWA Hiroyuki 544122e5e0 memcg: fix LRU accounting for SwapCache
Now, a page can be deleted from SwapCache while do_swap_page().
memcg-fix-swap-accounting-leak-v3.patch handles that, but, LRU handling is
still broken.  (above behavior broke assumption of memcg-synchronized-lru
patch.)

This patch is a fix for LRU handling (especially for per-zone counters).
At charging SwapCache,
 - Remove page_cgroup from LRU if it's not used.
 - Add page cgroup to LRU if it's not linked to.

Reported-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Paul Menage <menage@google.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-08 08:31:10 -08:00
..
2008-12-29 11:27:46 +02:00
2009-01-08 08:31:06 -08:00
2009-01-06 15:59:14 -08:00
2009-01-06 15:59:08 -08:00
2009-01-08 08:31:10 -08:00
2008-11-14 11:29:12 +11:00
2009-01-08 08:31:04 -08:00
2009-01-06 15:59:10 -08:00
2009-01-05 17:44:42 -08:00
2009-01-05 11:54:28 -05:00
2009-01-05 11:54:28 -05:00
2009-01-08 08:31:07 -08:00
2009-01-08 08:31:05 -08:00
2009-01-01 10:12:29 +10:30
2009-01-08 08:31:06 -08:00
2009-01-01 10:12:29 +10:30
2008-11-30 10:03:35 -08:00
2009-01-08 08:31:05 -08:00
2009-01-08 08:31:08 -08:00
2009-01-08 08:31:06 -08:00
2009-01-01 10:12:29 +10:30