summaryrefslogtreecommitdiffstats
path: root/mm/oom_kill.c
diff options
context:
space:
mode:
authorKAMEZAWA Hiroyuki2010-03-11 00:22:31 +0100
committerLinus Torvalds2010-03-13 00:52:37 +0100
commitd2265e6fa3f220ea5fd37522d13390e9675adcf7 (patch)
tree30e0264bcd379e21507b22243891880b7418f68f /mm/oom_kill.c
parentmemcg: update threshold and softlimit at commit (diff)
downloadkernel-qcow2-linux-d2265e6fa3f220ea5fd37522d13390e9675adcf7.tar.gz
kernel-qcow2-linux-d2265e6fa3f220ea5fd37522d13390e9675adcf7.tar.xz
kernel-qcow2-linux-d2265e6fa3f220ea5fd37522d13390e9675adcf7.zip
memcg : share event counter rather than duplicate
Memcg has 2 eventcountes which counts "the same" event. Just usages are different from each other. This patch tries to reduce event counter. Now logic uses "only increment, no reset" counter and masks for each checks. Softlimit chesk was done per 1000 evetns. So, the similar check can be done by !(new_counter & 0x3ff). Threshold check was done per 100 events. So, the similar check can be done by (!new_counter & 0x7f) ALL event checks are done right after EVENT percpu counter is updated. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Kirill A. Shutemov <kirill@shutemov.name> Cc: Balbir Singh <balbir@linux.vnet.ibm.com> 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>
Diffstat (limited to 'mm/oom_kill.c')
0 files changed, 0 insertions, 0 deletions