Skip to content

Commit

Permalink
slub: Force no inlining of debug functions
Browse files Browse the repository at this point in the history
Compiler folds the debgging functions into the critical paths.
Avoid that by adding noinline to the functions that check for
problems.

Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
  • Loading branch information
Christoph Lameter authored and Pekka Enberg committed Oct 2, 2010
1 parent 899611e commit 1537066
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ static void setup_object_debug(struct kmem_cache *s, struct page *page,
init_tracking(s, object);
}

static int alloc_debug_processing(struct kmem_cache *s, struct page *page,
static noinline int alloc_debug_processing(struct kmem_cache *s, struct page *page,
void *object, unsigned long addr)
{
if (!check_slab(s, page))
Expand Down Expand Up @@ -902,8 +902,8 @@ static int alloc_debug_processing(struct kmem_cache *s, struct page *page,
return 0;
}

static int free_debug_processing(struct kmem_cache *s, struct page *page,
void *object, unsigned long addr)
static noinline int free_debug_processing(struct kmem_cache *s,
struct page *page, void *object, unsigned long addr)
{
if (!check_slab(s, page))
goto fail;
Expand Down

0 comments on commit 1537066

Please sign in to comment.