]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
slub: Add kmem_cache_order_objects struct
authorChristoph Lameter <clameter@sgi.com>
Mon, 14 Apr 2008 16:11:31 +0000 (19:11 +0300)
committerPekka Enberg <penberg@cs.helsinki.fi>
Sun, 27 Apr 2008 15:28:17 +0000 (18:28 +0300)
commit834f3d119234b35a1985a2449831d99356637937
tree3106946ecbe174935daa7ac2ff4c7806cc3004b8
parent224a88be40c45c0da5bdc45a8118004a37c60e8a
slub: Add kmem_cache_order_objects struct

Pack the order and the number of objects into a single word.
This saves some memory in the kmem_cache_structure and more importantly
allows us to fetch both values atomically.

Later the slab orders become runtime configurable and we need to fetch these
two items together in order to properly allocate a slab and initialize its
objects.

Fix the race by fetching the order and the number of objects in one word.

[penberg@cs.helsinki.fi: fix memset() page order in new_slab()]
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
include/linux/slub_def.h
mm/slub.c