Skip to content

Commit

Permalink
SLAB: Fix unlikely() annotation in __cache_alloc_node()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tim Blechmann authored and Pekka Enberg committed Dec 6, 2009
1 parent ce79ddc commit 8e15b79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/slab.c
Original file line number Diff line number Diff line change
Expand Up @@ -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])) {
Expand Down

0 comments on commit 8e15b79

Please sign in to comment.