diff options
author | Christoph Lameter <clameter@sgi.com> | 2008-04-14 12:11:30 -0400 |
---|---|---|
committer | Pekka Enberg <penberg@cs.helsinki.fi> | 2008-04-27 11:28:16 -0400 |
commit | 39b264641a0c3b5e0e742e2046b49e92d1f3be88 (patch) | |
tree | 1b7059ec5a0e498254f516c1be11b525d43af3c8 /include | |
parent | 33b12c38134e95e5afa73214af6f49abd7b8418e (diff) |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mm_types.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index af190ceab971..e0bd2235296b 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
@@ -42,7 +42,10 @@ struct page { | |||
42 | * to show when page is mapped | 42 | * to show when page is mapped |
43 | * & limit reverse map searches. | 43 | * & limit reverse map searches. |
44 | */ | 44 | */ |
45 | unsigned int inuse; /* SLUB: Nr of objects */ | 45 | struct { /* SLUB */ |
46 | u16 inuse; | ||
47 | u16 objects; | ||
48 | }; | ||
46 | }; | 49 | }; |
47 | union { | 50 | union { |
48 | struct { | 51 | struct { |