From mboxrd@z Thu Jan 1 00:00:00 1970 From: Glauber Costa Subject: Re: [patch] mm, memcg: avoid unnecessary function call when memcg is disabled Date: Tue, 20 Nov 2012 12:34:29 +0400 Message-ID: <50AB4095.6000502@parallels.com> References: <50AB05B4.4000303@jp.fujitsu.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <50AB05B4.4000303-+CUm20s59erQFUHtdCDX3A@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" To: Kamezawa Hiroyuki Cc: David Rientjes , Andrew Morton , Johannes Weiner , Michal Hocko , Hugh Dickins , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org On 11/20/2012 08:23 AM, Kamezawa Hiroyuki wrote: > (2012/11/20 10:44), David Rientjes wrote: >> While profiling numa/core v16 with cgroup_disable=memory on the command >> line, I noticed mem_cgroup_count_vm_event() still showed up as high as >> 0.60% in perftop. >> >> This occurs because the function is called extremely often even when >> memcg >> is disabled. >> >> To fix this, inline the check for mem_cgroup_disabled() so we avoid the >> unnecessary function call if memcg is disabled. >> >> Signed-off-by: David Rientjes > > Acked-By: KAMEZAWA Hiroyuki > I am fine with this as well. Acked-by: Glauber Costa