lkml.org 
[lkml]   [2008]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 4/5] kmemtrace: SLUB hooks.
Hi Eduard-Gabriel,

On Thu, Jul 10, 2008 at 9:06 PM, Eduard - Gabriel Munteanu
<eduard.munteanu@linux360.ro> wrote:
> This adds hooks for the SLUB allocator, to allow tracing with kmemtrace.
>
> Signed-off-by: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>

> @@ -205,7 +206,13 @@ void *__kmalloc(size_t size, gfp_t flags);
>
> static __always_inline void *kmalloc_large(size_t size, gfp_t flags)
> {
> - return (void *)__get_free_pages(flags | __GFP_COMP, get_order(size));
> + unsigned int order = get_order(size);
> + void *ret = (void *) __get_free_pages(flags, order);
> +
> + kmemtrace_mark_alloc(KMEMTRACE_KIND_KERNEL, _THIS_IP_, ret,
> + size, PAGE_SIZE << order, flags);

Oh, I missed this on the first review. Here we have, like in SLOB,
page allocator pass-through, so wouldn't KIND_PAGES be more
appropriate?


\
 
 \ /
  Last update: 2008-07-11 10:49    [W:0.132 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site