From: Pekka Enberg Date: Sat, 2 Oct 2010 08:32:32 +0000 (+0300) Subject: SLUB: Optimize slab_free() debug check X-Git-Tag: v2.6.37-rc1~141^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15b7c5142049e7efc3071280e1370dc3b8add6f5;p=pandora-kernel.git SLUB: Optimize slab_free() debug check This patch optimizes slab_free() debug check to use "c->node != NUMA_NO_NODE" instead of "c->node >= 0" because the former generates smaller code on x86-64: Before: 4736: 48 39 70 08 cmp %rsi,0x8(%rax) 473a: 75 26 jne 4762 473c: 44 8b 48 10 mov 0x10(%rax),%r9d 4740: 45 85 c9 test %r9d,%r9d 4743: 78 1d js 4762 After: 4736: 48 39 70 08 cmp %rsi,0x8(%rax) 473a: 75 23 jne 475f 473c: 83 78 10 ff cmpl $0xffffffffffffffff,0x10(%rax) 4740: 74 1d je 475f This patch also cleans up __slab_alloc() to use NUMA_NO_NODE instead of "-1" for enabling debugging for a per-CPU cache. Acked-by: Christoph Lameter Acked-by: David Rientjes Signed-off-by: Pekka Enberg --- Reading git-diff-tree failed