Prev: [PATCH] Fix inappropriate substraction on tracing_pages_allocated in trace_free_page()in 2.6.27.y series kernel
Next: [PATCH 2/3] tcp: Handle CHECKSUM_PARTIAL for SYNACK packets for IPv6
From: Pekka Enberg on 11 Apr 2010 02:50 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(a)redhat.com> >> Cc: Pekka Enberg <penberg(a)cs.helsinki.fi> >> Cc: Matt Mackall <mpm(a)selenic.com> >> Cc: David Rientjes <rientjes(a)google.com> > > Acked-by: David Rientjes <rientjes(a)google.com> > >> Cc: Ingo Molnar <mingo(a)elte.hu> >> Cc: Vegard Nossum <vegard.nossum(a)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 from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |