From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934839AbZLKHGh (ORCPT ); Fri, 11 Dec 2009 02:06:37 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S934820AbZLKHGe (ORCPT ); Fri, 11 Dec 2009 02:06:34 -0500 Received: from cn.fujitsu.com ([222.73.24.84]:62431 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S934815AbZLKHGd (ORCPT ); Fri, 11 Dec 2009 02:06:33 -0500 Message-ID: <4B21EF6D.4070207@cn.fujitsu.com> Date: Fri, 11 Dec 2009 15:06:21 +0800 From: Li Zefan User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Thunderbird/3.0b2 MIME-Version: 1.0 To: Pekka Enberg CC: Ingo Molnar , Christoph Lameter , Steven Rostedt , Frederic Weisbecker , "linux-mm@kvack.org" , LKML , Eduard - Gabriel Munteanu Subject: Re: [PATCH 1/2] tracing: Define kmem_trace_alloc_notrace unconditionally References: <4B21DD88.7080806@cn.fujitsu.com> <4B21DF33.7010906@cs.helsinki.fi> <4B21E07B.9040301@cn.fujitsu.com> <4B21E806.6070207@cs.helsinki.fi> In-Reply-To: <4B21E806.6070207@cs.helsinki.fi> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>>> Always define kmem_trace_alloc_{,node}_notrace(), otherwise >>>> perf-kmem will show wrong stats ifndef CONFIG_KMEMTRACE, >>>> because a kmalloc() memory allocation may be traced by >>>> both trace_kmalloc() and trace_kmem_cache_alloc(). >>>> >>>> Signed-off-by: Li Zefan >>> Did you check how much this will make kernel text bigger because of the >>> inlining happening in kmem_cache_alloc_notrace()? >>> >> >> I'm not sure I understood what you meant, but I'm not inlining >> kmem_cache_alloc_notrace(), and instead I'm removing the inline >> version in !CONFIG_KMEMTRACE case. > > In SLUB, slab_alloc() will be inlined to kmem_cache_alloc_notrace() > increasing mm/slub.o size so we don't want to define > kmem_cache_alloc_notrace() unconditionally. > I got your point. I'll make a new patch based on your suggestion. Thanks!