https://github.com/torvalds/linux
Revision 4d0c066d29f030d47d19678f8008933e67dd3b72 authored by KAMEZAWA Hiroyuki on 08 July 2011, 22:39:42 UTC, committed by Linus Torvalds on 09 July 2011, 04:14:43 UTC
Now, in mem_cgroup_hierarchical_reclaim(), mem_cgroup_local_usage() is
used for checking whether the memcg contains reclaimable pages or not.  If
no pages in it, the routine skips it.

But, mem_cgroup_local_usage() contains Unevictable pages and cannot handle
"noswap" condition correctly.  This doesn't work on a swapless system.

This patch adds test_mem_cgroup_reclaimable() and replaces
mem_cgroup_local_usage().  test_mem_cgroup_reclaimable() see LRU counter
and returns correct answer to the caller.  And this new function has
"noswap" argument and can see only FILE LRU if necessary.

[akpm@linux-foundation.org: coding-style fixes]
[akpm@linux-foundation.org: fix kerneldoc layout]
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Ying Han <yinghan@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 0b43c3a
History
Tip revision: 4d0c066d29f030d47d19678f8008933e67dd3b72 authored by KAMEZAWA Hiroyuki on 08 July 2011, 22:39:42 UTC
memcg: fix reclaimable lru check in memcg
Tip revision: 4d0c066
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore -rw-r--r-- 966 bytes
.mailmap -rw-r--r-- 4.2 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 92.3 KB
Kbuild -rw-r--r-- 2.4 KB
Kconfig -rw-r--r-- 252 bytes
MAINTAINERS -rw-r--r-- 190.3 KB
Makefile -rw-r--r-- 52.2 KB
README -rw-r--r-- 17.0 KB
REPORTING-BUGS -rw-r--r-- 3.3 KB

README

back to top