]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
Slab allocators: define common size limitations
authorChristoph Lameter <clameter@sgi.com>
Thu, 17 May 2007 05:11:01 +0000 (22:11 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 17 May 2007 12:23:04 +0000 (05:23 -0700)
commit0aa817f078b655d0ae36669169d73a5c8a388016
tree140acc4d0dc992b4d20394f6a6412a7c1bb3a306
parent3ec0974210fe1b7c0618ad6e39a882a4237d7de2
Slab allocators: define common size limitations

Currently we have a maze of configuration variables that determine the
maximum slab size.  Worst of all it seems to vary between SLAB and SLUB.

So define a common maximum size for kmalloc.  For conveniences sake we use
the maximum size ever supported which is 32 MB.  We limit the maximum size
to a lower limit if MAX_ORDER does not allow such large allocations.

For many architectures this patch will have the effect of adding large
kmalloc sizes.  x86_64 adds 5 new kmalloc sizes.  So a small amount of
memory will be needed for these caches (contemporary SLAB has dynamically
sizeable node and cpu structure so the waste is less than in the past)

Most architectures will then be able to allocate object with sizes up to
MAX_ORDER.  We have had repeated breakage (in fact whenever we doubled the
number of supported processors) on IA64 because one or the other struct
grew beyond what the slab allocators supported.  This will avoid future
issues and f.e.  avoid fixes for 2k and 4k cpu support.

CONFIG_LARGE_ALLOCS is no longer necessary so drop it.

It fixes sparc64 with SLAB.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/blackfin/Kconfig
arch/frv/Kconfig
arch/m68knommu/Kconfig
arch/v850/Kconfig
include/linux/kmalloc_sizes.h
include/linux/slab.h
include/linux/slub_def.h
mm/slab.c