Skip to content

RFC The Enhanced(hopefully) Slab Allocator

Christoph Lameter linux-mm lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest14 patches 54 repliesIn review
  2. v1 RFC10 patches 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14slab: Introduce a constant for a unspecified node.include/linux/slab.h mm/slub.c+7 -58 replies
2/14SLUB: Constants need ULmm/slub.c+2 -20 replies
3/14SLUB: Use kmem_cache flags to detect if Slab is in debugging mode.include/linux/page-flags.h mm/slub.c+12 -221 reply
4/14SLUB: discard_slab_unlockmm/slub.c+10 -60 replies
5/14SLUB: is_kmalloc_cachemm/slub.c+7 -31 reply
6/14SLUB: Get rid of the kmalloc_node slabmm/slub.c+24 -154 replies
7/14SLEB: The Enhanced Slab Allocatorinclude/linux/slub_def.h mm/slub.c+415 -5080 replies
8/14SLEB: Resize cpu queueinclude/linux/slub_def.h mm/slub.c+143 -110 replies
9/14SLED: Get rid of useless functionmm/slub.c+3 -80 replies
10/14SLEB: Remove MAX_OBJS limitationinclude/linux/mm_types.h mm/slub.c+1 -110 replies
11/14SLEB: Add per node cache (with a fixed size for now)include/linux/slub_def.h mm/slub.c+44 -00 replies
12/14SLEB: Make the size of the shared cache configurableinclude/linux/slub_def.h mm/slub.c+116 -200 replies
13/14SLEB: Enhanced NUMA supportmm/slub.c+70 -00 replies
14/14SLEB: Allocate off node objects from remote shared cachesinclude/linux/slub_def.h mm/slub.c+142 -430 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [RFC V2 SLEB 00/14] The Enhanced(hopefully) Slab Allocator

(V2 some more work as time permitted this week)

SLEB is a merging of SLUB with some queuing concepts from SLAB and a new way of managing objects in the slabs using bitmaps. It uses a percpu queue so that free operations can be properly buffered and a bitmap for managing the free/allocated state in the slabs. It is slightly more inefficient than SLUB (due to the need to place large bitmaps --sized a few words--in some slab pages if there are more than BITS_PER_LONG objects in a slab page) but in general does compete well with SLUB (and therefore also with SLOB) in terms of memory wastage.

It does not have the excessive memory requirements of SLAB because there is no slab management structure nor alien caches. Under NUMA the remote shared caches are used instead (which may have its issues).

The SLAB scheme of not touching the object during management is adopted. SLEB can efficiently free and allocate cache cold objects without causing cache misses.

There are numerous SLAB schemes that are not supported. Those could be added if needed and if they really make a difference.

WARNING: This only ran successfully using hackbench in kvm instances so far. But works with NUMA, SMP and UP there.

V1->V2 Add NUMA capabilities. Refine queue size configurations (not complete).
Test in UP, SMP, NUMA

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>