From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail144.messagelabs.com (mail144.messagelabs.com [216.82.254.51]) by kanga.kvack.org (Postfix) with ESMTP id 914BF6B002C for ; Thu, 13 Oct 2011 01:54:51 -0400 (EDT) Received: from m1.gw.fujitsu.co.jp (unknown [10.0.50.71]) by fgwmail5.fujitsu.co.jp (Postfix) with ESMTP id 301B03EE0C8 for ; Thu, 13 Oct 2011 14:54:48 +0900 (JST) Received: from smail (m1 [127.0.0.1]) by outgoing.m1.gw.fujitsu.co.jp (Postfix) with ESMTP id C520145DE58 for ; Thu, 13 Oct 2011 14:54:47 +0900 (JST) Received: from s1.gw.fujitsu.co.jp (s1.gw.fujitsu.co.jp [10.0.50.91]) by m1.gw.fujitsu.co.jp (Postfix) with ESMTP id AE17F45DE5A for ; Thu, 13 Oct 2011 14:54:47 +0900 (JST) Received: from s1.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s1.gw.fujitsu.co.jp (Postfix) with ESMTP id 940F3E08005 for ; Thu, 13 Oct 2011 14:54:47 +0900 (JST) Received: from ml13.s.css.fujitsu.com (ml13.s.css.fujitsu.com [10.240.81.133]) by s1.gw.fujitsu.co.jp (Postfix) with ESMTP id 55D7E1DB8054 for ; Thu, 13 Oct 2011 14:54:47 +0900 (JST) Date: Thu, 13 Oct 2011 14:53:53 +0900 From: KAMEZAWA Hiroyuki Subject: Re: [PATCH v6 3/8] foundations of per-cgroup memory pressure controlling. Message-Id: <20111013145353.161009ea.kamezawa.hiroyu@jp.fujitsu.com> In-Reply-To: <1318242268-2234-4-git-send-email-glommer@parallels.com> References: <1318242268-2234-1-git-send-email-glommer@parallels.com> <1318242268-2234-4-git-send-email-glommer@parallels.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Glauber Costa Cc: linux-kernel@vger.kernel.org, paul@paulmenage.org, lizf@cn.fujitsu.com, ebiederm@xmission.com, davem@davemloft.net, gthelen@google.com, netdev@vger.kernel.org, linux-mm@kvack.org, kirill@shutemov.name, avagin@parallels.com, devel@openvz.org On Mon, 10 Oct 2011 14:24:23 +0400 Glauber Costa wrote: > This patch converts struct sock fields memory_pressure, > memory_allocated, sockets_allocated, and sysctl_mem (now prot_mem) > to function pointers, receiving a struct mem_cgroup parameter. > > enter_memory_pressure is kept the same, since all its callers > have socket a context, and the kmem_cgroup can be derived from > the socket itself. > > To keep things working, the patch convert all users of those fields > to use acessor functions. > > In my benchmarks I didn't see a significant performance difference > with this patch applied compared to a baseline (around 1 % diff, thus > inside error margin). > > Signed-off-by: Glauber Costa > CC: David S. Miller > CC: Hiroyouki Kamezawa > CC: Eric W. Biederman Reviewed-by: KAMEZAWA Hiroyuki a nitpick. > #ifdef CONFIG_INET > +enum { > + UNDER_LIMIT, > + OVER_LIMIT, > +}; > + It may be better to move this to res_counter.h or memcontrol.h -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org