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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx164.postini.com [74.125.245.164]) by kanga.kvack.org (Postfix) with SMTP id B94B16B0072 for ; Mon, 19 Nov 2012 23:23:55 -0500 (EST) Received: from m3.gw.fujitsu.co.jp (unknown [10.0.50.73]) by fgwmail5.fujitsu.co.jp (Postfix) with ESMTP id D72B23EE0BD for ; Tue, 20 Nov 2012 13:23:53 +0900 (JST) Received: from smail (m3 [127.0.0.1]) by outgoing.m3.gw.fujitsu.co.jp (Postfix) with ESMTP id 75FBD45DEBA for ; Tue, 20 Nov 2012 13:23:53 +0900 (JST) Received: from s3.gw.fujitsu.co.jp (s3.gw.fujitsu.co.jp [10.0.50.93]) by m3.gw.fujitsu.co.jp (Postfix) with ESMTP id 5967145DEB6 for ; Tue, 20 Nov 2012 13:23:53 +0900 (JST) Received: from s3.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s3.gw.fujitsu.co.jp (Postfix) with ESMTP id 40FFB1DB803E for ; Tue, 20 Nov 2012 13:23:53 +0900 (JST) Received: from m1000.s.css.fujitsu.com (m1000.s.css.fujitsu.com [10.240.81.136]) by s3.gw.fujitsu.co.jp (Postfix) with ESMTP id EA4391DB803B for ; Tue, 20 Nov 2012 13:23:52 +0900 (JST) Message-ID: <50AB05B4.4000303@jp.fujitsu.com> Date: Tue, 20 Nov 2012 13:23:16 +0900 From: Kamezawa Hiroyuki MIME-Version: 1.0 Subject: Re: [patch] mm, memcg: avoid unnecessary function call when memcg is disabled References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: David Rientjes Cc: Andrew Morton , Johannes Weiner , Michal Hocko , Hugh Dickins , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.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 -- 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/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751635Ab2KTEX4 (ORCPT ); Mon, 19 Nov 2012 23:23:56 -0500 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:59553 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750719Ab2KTEXy (ORCPT ); Mon, 19 Nov 2012 23:23:54 -0500 X-SecurityPolicyCheck: OK by SHieldMailChecker v1.8.4 Message-ID: <50AB05B4.4000303@jp.fujitsu.com> Date: Tue, 20 Nov 2012 13:23:16 +0900 From: Kamezawa Hiroyuki User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 To: David Rientjes CC: Andrew Morton , Johannes Weiner , Michal Hocko , Hugh Dickins , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org Subject: Re: [patch] mm, memcg: avoid unnecessary function call when memcg is disabled References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.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