slub: Store max number of objects in the page struct.
authorChristoph Lameter <clameter@sgi.com>
Mon, 14 Apr 2008 16:11:30 +0000 (19:11 +0300)
committerPekka Enberg <penberg@cs.helsinki.fi>
Sun, 27 Apr 2008 15:28:16 +0000 (18:28 +0300)
commit39b264641a0c3b5e0e742e2046b49e92d1f3be88
tree1b7059ec5a0e498254f516c1be11b525d43af3c8
parent33b12c38134e95e5afa73214af6f49abd7b8418e
slub: Store max number of objects in the page struct.

Split the inuse field up to be able to store the number of objects in this
page in the page struct as well. Necessary if we want to have pages of
various orders for a slab. Also avoids touching struct kmem_cache cachelines in
__slab_alloc().

Update diagnostic code to check the number of objects and make sure that
the number of objects always stays within the bounds of a 16 bit unsigned
integer.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
include/linux/mm_types.h
mm/slub.c