lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 27 Mar 2009 14:13:22 +0900 From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com> To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com> Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "linux-mm@...ck.org" <linux-mm@...ck.org>, "balbir@...ux.vnet.ibm.com" <balbir@...ux.vnet.ibm.com>, "kosaki.motohiro@...fujitsu.com" <kosaki.motohiro@...fujitsu.com>, "nishimura@....nes.nec.co.jp" <nishimura@....nes.nec.co.jp> Subject: [RFC][PATCH 8/8] extends soft limit event filter Reduce softlimit update ratio depends on its priority(usage). Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com> --- mm/memcontrol.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) Index: mmotm-2.6.29-Mar23/mm/memcontrol.c =================================================================== --- mmotm-2.6.29-Mar23.orig/mm/memcontrol.c +++ mmotm-2.6.29-Mar23/mm/memcontrol.c @@ -945,11 +945,15 @@ static bool mem_cgroup_soft_limit_check( bool ret = false; int cpu = get_cpu(); s64 val; + int thresh; struct mem_cgroup_stat_cpu *cpustat; cpustat = &mem->stat.cpustat[cpu]; val = __mem_cgroup_stat_read_local(cpustat, MEM_CGROUP_STAT_EVENTS); - if (unlikely(val > SOFTLIMIT_EVENTS_THRESH)) { + /* If usage is big, this check can be rough */ + thresh = SOFTLIMIT_EVENTS_THRESH; + thresh <<= (mem->soft_limit_priority >> 1); + if (unlikely(val > thresh)) { __mem_cgroup_stat_reset_safe(cpustat, MEM_CGROUP_STAT_EVENTS); ret = true; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists