]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
slub: Force no inlining of debug functions
authorChristoph Lameter <cl@linux.com>
Fri, 20 Aug 2010 17:37:12 +0000 (12:37 -0500)
committerPekka Enberg <penberg@kernel.org>
Sat, 2 Oct 2010 07:24:26 +0000 (10:24 +0300)
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>
mm/slub.c

index 13fffe1f0f3dc5992471ffd590326b9517b0cc3a..d28ee64bcdb59210da325c30d6051aa085705d77 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -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))
@@ -902,8 +902,8 @@ bad:
        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;