summaryrefslogtreecommitdiff
path: root/include/linux/mm_types.h
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@sgi.com>2008-04-14 16:11:30 (GMT)
committerPekka Enberg <penberg@cs.helsinki.fi>2008-04-27 15:28:16 (GMT)
commit39b264641a0c3b5e0e742e2046b49e92d1f3be88 (patch)
tree1b7059ec5a0e498254f516c1be11b525d43af3c8 /include/linux/mm_types.h
parent33b12c38134e95e5afa73214af6f49abd7b8418e (diff)
downloadlinux-fsl-qoriq-39b264641a0c3b5e0e742e2046b49e92d1f3be88.tar.xz
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/linux/mm_types.h')
-rw-r--r--include/linux/mm_types.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index af190ce..e0bd223 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -42,7 +42,10 @@ struct page {
* to show when page is mapped
* & limit reverse map searches.
*/
- unsigned int inuse; /* SLUB: Nr of objects */
+ struct { /* SLUB */
+ u16 inuse;
+ u16 objects;
+ };
};
union {
struct {