SLUB: Make slub statistics use this_cpu_inc
authorChristoph Lameter <cl@linux-foundation.org>
Fri, 18 Dec 2009 22:26:23 +0000 (16:26 -0600)
committerPekka Enberg <penberg@cs.helsinki.fi>
Sun, 20 Dec 2009 08:39:34 +0000 (10:39 +0200)
commit84e554e6865c4f4ae84d38800cf270b9a67901cc
tree9bf5ce0596a9ffeee9e6a307eadbce6086f636ba
parentff12059ed14b0773d7bbef86f98218ada6c20770
SLUB: Make slub statistics use this_cpu_inc

this_cpu_inc() translates into a single instruction on x86 and does not
need any register. So use it in stat(). We also want to avoid the
calculation of the per cpu kmem_cache_cpu structure pointer. So pass
a kmem_cache pointer instead of a kmem_cache_cpu pointer.

Signed-off-by: Christoph Lameter <cl@linux-foundation.org>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
mm/slub.c