]> git.baikalelectronics.ru Git - kernel.git/commit
mm, sl[aou]b: Extract common fields from struct kmem_cache
authorChristoph Lameter <cl@linux.com>
Wed, 13 Jun 2012 15:24:57 +0000 (10:24 -0500)
committerPekka Enberg <penberg@kernel.org>
Thu, 14 Jun 2012 06:20:16 +0000 (09:20 +0300)
commit2eb8f77640227d3fe38b778cabbe3d8e1e3364e7
tree6a429eebb3febe5cc2101615ec7c7ea4d10fd97b
parent0ebf2b073b9539dc9e608b1ae86f7b11dee3bb7e
mm, sl[aou]b: Extract common fields from struct kmem_cache

Define a struct that describes common fields used in all slab allocators.
A slab allocator either uses the common definition (like SLOB) or is
required to provide members of kmem_cache with the definition given.

After that it will be possible to share code that
only operates on those fields of kmem_cache.

The patch basically takes the slob definition of kmem cache and
uses the field namees for the other allocators.

It also standardizes the names used for basic object lengths in
allocators:

object_size Struct size specified at kmem_cache_create. Basically
the payload expected to be used by the subsystem.

size The size of memory allocator for each object. This size
is larger than object_size and includes padding, alignment
and extra metadata for each object (f.e. for debugging
and rcu).

Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
include/linux/slab.h
include/linux/slab_def.h
include/linux/slub_def.h
mm/slab.c
mm/slob.c
mm/slub.c