Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752905Ab2KTIeh (ORCPT ); Tue, 20 Nov 2012 03:34:37 -0500 Received: from mx2.parallels.com ([64.131.90.16]:60114 "EHLO mx2.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752160Ab2KTIeg (ORCPT ); Tue, 20 Nov 2012 03:34:36 -0500 Message-ID: <50AB4095.6000502@parallels.com> Date: Tue, 20 Nov 2012 12:34:29 +0400 From: Glauber Costa User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121029 Thunderbird/16.0.2 MIME-Version: 1.0 To: Kamezawa Hiroyuki CC: David Rientjes , Andrew Morton , Johannes Weiner , Michal Hocko , Hugh Dickins , , , Subject: Re: [patch] mm, memcg: avoid unnecessary function call when memcg is disabled References: <50AB05B4.4000303@jp.fujitsu.com> In-Reply-To: <50AB05B4.4000303@jp.fujitsu.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 943 Lines: 26 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/