From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kamezawa Hiroyuki Subject: Re: [patch] mm, memcg: avoid unnecessary function call when memcg is disabled Date: Tue, 20 Nov 2012 13:23:16 +0900 Message-ID: <50AB05B4.4000303@jp.fujitsu.com> References: Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: David Rientjes Cc: 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 (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