]> Git Repo - linux.git/commit - mm/slub.c
slub: automatically reserve bytes at the end of slab
authorLai Jiangshan <[email protected]>
Thu, 10 Mar 2011 07:21:48 +0000 (15:21 +0800)
committerPekka Enberg <[email protected]>
Fri, 11 Mar 2011 16:06:34 +0000 (18:06 +0200)
commitab9a0f196f2f4f080df54402493ea3dc31b5243e
tree849ce2a8bf2c2574b8ea9a368873aebfb25186b0
parenta5abba989deceb731047425812d268daf7536575
slub: automatically reserve bytes at the end of slab

There is no "struct" for slub's slab, it shares with struct page.
But struct page is very small, it is insufficient when we need
to add some metadata for slab.

So we add a field "reserved" to struct kmem_cache, when a slab
is allocated, kmem_cache->reserved bytes are automatically reserved
at the end of the slab for slab's metadata.

Changed from v1:
Export the reserved field via sysfs

Acked-by: Christoph Lameter <[email protected]>
Signed-off-by: Lai Jiangshan <[email protected]>
Signed-off-by: Pekka Enberg <[email protected]>
include/linux/slub_def.h
mm/slub.c
This page took 0.07169 seconds and 4 git commands to generate.