SLAB: Fix unlikely() annotation in __cache_alloc_node()
authorTim Blechmann <tim@klingt.org>
Mon, 30 Nov 2009 17:59:34 +0000 (18:59 +0100)
committerPekka Enberg <penberg@cs.helsinki.fi>
Sun, 6 Dec 2009 08:21:21 +0000 (10:21 +0200)
Branch profiling on my nehalem machine showed 99% incorrect branch hints:

   28459  7678524  99 __cache_alloc_node             slab.c               3551

Discussion on lkml [1] led to the solution to remove this hint.

[1] http://patchwork.kernel.org/patch/63517/

Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
mm/slab.c

index 84de47e..a07540e 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -3320,7 +3320,7 @@ __cache_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid,
        cache_alloc_debugcheck_before(cachep, flags);
        local_irq_save(save_flags);
 
-       if (unlikely(nodeid == -1))
+       if (nodeid == -1)
                nodeid = numa_node_id();
 
        if (unlikely(!cachep->nodelists[nodeid])) {