From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail202.messagelabs.com (mail202.messagelabs.com [216.82.254.227]) by kanga.kvack.org (Postfix) with ESMTP id AAB7F6B01E3 for ; Sun, 11 Apr 2010 02:40:58 -0400 (EDT) Message-ID: <4BC16EF2.5060802@cs.helsinki.fi> Date: Sun, 11 Apr 2010 09:40:50 +0300 From: Pekka Enberg MIME-Version: 1.0 Subject: Re: [PATCH] slub: __kmalloc_node_track_caller should trace kmalloc_large_node case References: <1270718804-27268-1-git-send-email-dfeng@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org To: David Rientjes Cc: Xiaotian Feng , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Matt Mackall , Ingo Molnar , Vegard Nossum , cl@linux-foundation.org List-ID: David Rientjes wrote: > On Thu, 8 Apr 2010, Xiaotian Feng wrote: > >> commit 94b528d (kmemtrace: SLUB hooks for caller-tracking functions) >> missed tracing kmalloc_large_node in __kmalloc_node_track_caller. We >> should trace it same as __kmalloc_node. >> >> Signed-off-by: Xiaotian Feng >> Cc: Pekka Enberg >> Cc: Matt Mackall >> Cc: David Rientjes > > Acked-by: David Rientjes > >> Cc: Ingo Molnar >> Cc: Vegard Nossum >> --- >> mm/slub.c | 11 +++++++++-- >> 1 files changed, 9 insertions(+), 2 deletions(-) >> >> diff --git a/mm/slub.c b/mm/slub.c >> index b364844..a3a5a18 100644 >> --- a/mm/slub.c >> +++ b/mm/slub.c >> @@ -3335,8 +3335,15 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags, >> struct kmem_cache *s; >> void *ret; >> >> - if (unlikely(size > SLUB_MAX_SIZE)) >> - return kmalloc_large_node(size, gfpflags, node); >> + if (unlikely(size > SLUB_MAX_SIZE)) { >> + ret = kmalloc_large_node(size, gfpflags, node); >> + >> + trace_kmalloc_node(caller, ret, >> + size, PAGE_SIZE << get_order(size), >> + gfpflags, node); >> + >> + return ret; >> + } >> >> s = get_slab(size, gfpflags); >> Applied, thanks! -- 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