From: Christoph Lameter Make SLUB the default slab allocator WARNING: This is a new allocator. No guarantees. Known areas of concern: A. i386 and FRV arches have been disabled by setting ARCH_USES_SLAB_PAGE_STRUCT. SLUB cannot be enabled on those platforms. The issue is that both arches use the page->index and page->private field of memory allocated via the slab. SLUB uses these fields too. There are a variety of patches out there (some by me, some by Bill Irwin) to address this but without those you may be stuck until Bill Irwin comes up with a definite solution. B. There may be undiscovered locations in arch code that are as badly behaved as i386 and FRV which will likely cause the arch not to boot and fail with mysterious error messages. C. Unlike SLAB, SLUB does not special case page sized allocations. SLAB aligns kmallocs of page sized allocation on page boundaries. SLUB also does that most of the time but does not guarantee alignment beyond KMALLOC_ARCH_MINALIGN that is valid for other kmalloc slabs. In particular enabling debugging will add some tracking information to slabs which will usually cause page sized slabs to become no longer aligned on page boundaries. If there is arch code that relies on this behavior then we are likely to see funky behavior. Code that uses page sized allocations via kmalloc should either use the page allocator or explictly request page aligned data from the slab by creating a custom slab with the needed alignment. Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton --- init/Kconfig | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff -puN init/Kconfig~slub-mm-only-make-slub-the-default-slab-allocator init/Kconfig --- a/init/Kconfig~slub-mm-only-make-slub-the-default-slab-allocator +++ a/init/Kconfig @@ -485,7 +485,7 @@ config VM_EVENT_COUNTERS choice prompt "Choose SLAB allocator" - default SLAB + default SLUB help This option allows to select a slab allocator. @@ -498,7 +498,7 @@ config SLAB slab allocator. config SLUB - depends on EXPERIMENTAL && !ARCH_USES_SLAB_PAGE_STRUCT + depends on !ARCH_USES_SLAB_PAGE_STRUCT bool "SLUB (Unqueued Allocator)" help SLUB is a slab allocator that minimizes cache line usage _