linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Pekka Enberg <penberg@cs.helsinki.fi>
To: David Rientjes <rientjes@google.com>
Cc: Xiaotian Feng <dfeng@redhat.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Matt Mackall <mpm@selenic.com>, Ingo Molnar <mingo@elte.hu>,
	Vegard Nossum <vegard.nossum@gmail.com>,
	cl@linux-foundation.org
Subject: Re: [PATCH] slub: __kmalloc_node_track_caller should trace kmalloc_large_node case
Date: Sun, 11 Apr 2010 09:40:50 +0300	[thread overview]
Message-ID: <4BC16EF2.5060802@cs.helsinki.fi> (raw)
In-Reply-To: <alpine.DEB.2.00.1004081202570.21040@chino.kir.corp.google.com>

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 <dfeng@redhat.com>
>> Cc: Pekka Enberg <penberg@cs.helsinki.fi>
>> Cc: Matt Mackall <mpm@selenic.com>
>> Cc: David Rientjes <rientjes@google.com>
> 
> Acked-by: David Rientjes <rientjes@google.com>
> 
>> Cc: Ingo Molnar <mingo@elte.hu>
>> Cc: Vegard Nossum <vegard.nossum@gmail.com>
>> ---
>>  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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2010-04-11  6:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-08  9:26 [PATCH] slub: __kmalloc_node_track_caller should trace kmalloc_large_node case Xiaotian Feng
2010-04-08 19:03 ` David Rientjes
2010-04-11  6:40   ` Pekka Enberg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BC16EF2.5060802@cs.helsinki.fi \
    --to=penberg@cs.helsinki.fi \
    --cc=cl@linux-foundation.org \
    --cc=dfeng@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mingo@elte.hu \
    --cc=mpm@selenic.com \
    --cc=rientjes@google.com \
    --cc=vegard.nossum@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).