]> git.baikalelectronics.ru Git - kernel.git/commit
slab: Common kmalloc slab index determination
authorChristoph Lameter <cl@linux.com>
Thu, 10 Jan 2013 19:14:19 +0000 (19:14 +0000)
committerPekka Enberg <penberg@kernel.org>
Fri, 1 Feb 2013 10:32:05 +0000 (12:32 +0200)
commiteb057178d5bedec6bf32ea12c2c39a977cacfc0f
tree099024fa474177d2e26709de76a211050ee9a4a1
parent75476f342f310503052f9f52c444b52674dc23ac
slab: Common kmalloc slab index determination

Extract the function to determine the index of the slab within
the array of kmalloc caches as well as a function to determine
maximum object size from the nr of the kmalloc slab.

This is used here only to simplify slub bootstrap but will
be used later also for SLAB.

Acked-by: Glauber Costa <glommer@parallels.com>
Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
include/linux/slab.h
include/linux/slub_def.h