]> git.baikalelectronics.ru Git - kernel.git/commit
SLUB: Use this_cpu operations in slub
authorChristoph Lameter <cl@linux-foundation.org>
Fri, 18 Dec 2009 22:26:20 +0000 (16:26 -0600)
committerPekka Enberg <penberg@cs.helsinki.fi>
Sun, 20 Dec 2009 07:29:18 +0000 (09:29 +0200)
commit973433975e20570fb24340accc26631d900c1193
tree40e54f2819e176ceb95b8899265bd48751965c27
parent65bae8948c986836164730d684f472bfe5ab6578
SLUB: Use this_cpu operations in slub

Using per cpu allocations removes the needs for the per cpu arrays in the
kmem_cache struct. These could get quite big if we have to support systems
with thousands of cpus. The use of this_cpu_xx operations results in:

1. The size of kmem_cache for SMP configuration shrinks since we will only
   need 1 pointer instead of NR_CPUS. The same pointer can be used by all
   processors. Reduces cache footprint of the allocator.

2. We can dynamically size kmem_cache according to the actual nodes in the
   system meaning less memory overhead for configurations that may potentially
   support up to 1k NUMA nodes / 4k cpus.

3. We can remove the diddle widdle with allocating and releasing of
   kmem_cache_cpu structures when bringing up and shutting down cpus. The cpu
   alloc logic will do it all for us. Removes some portions of the cpu hotplug
   functionality.

4. Fastpath performance increases since per cpu pointer lookups and
   address calculations are avoided.

V7-V8
- Convert missed get_cpu_slab() under CONFIG_SLUB_STATS

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