From: KAMEZAWA Hiroyuki Date: Wed, 10 Mar 2010 23:22:31 +0000 (-0800) Subject: memcg : share event counter rather than duplicate X-Git-Tag: v2.6.34-rc2~162 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2265e6fa3f220ea5fd37522d13390e9675adcf7;p=pandora-kernel.git 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 Cc: Kirill A. Shutemov Cc: Balbir Singh Cc: Daisuke Nishimura Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed