Skip to content

The Unified slab allocator (V4)

Christoph Lameter linux-mm lkml 1 version Applied

Status from this message: I applied this patch. Thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest16 patches 29 repliesApplied

V3->V4 from the cover letter

- Lots of debugging
- Performance optimizations (more would be good)...
- Drop per slab locking in favor of per node locking for partial lists (queuing implies freeing large amounts of objects to per node lists of slab).
- Implement object expiration via reclaim VM logic.

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/16slub: Enable sysfs support for !CONFIG_SLUB_DEBUGinclude/linux/slub_def.h lib/Kconfig.debug mm/slub.c+37 -71 reply
2/16slub: Move functions to reduce #ifdefsmm/slub.c+141 -1561 reply
3/16slub: Add per cpu queueinginclude/linux/page-flags.h include/linux/poison.h include/linux/slub_def.h +2 more+608 -6240 replies
4/16slub: Allow resizing of per cpu queuesinclude/linux/slub_def.h mm/slub.c+203 -330 replies
5/16slub: Remove MAX_OBJS limitationinclude/linux/mm_types.h mm/slub.c+1 -110 replies
6/16slub: Drop allocator announcementmm/slub.c+0 -60 replies
7/16slub: Object based NUMA policiesinclude/linux/slub_def.h mm/slub.c+100 -1300 replies
8/16slub: Get rid of page lock and rely on per node lockinclude/linux/slub_def.h mm/slub.c+167 -2120 replies
9/16slub: Shared cache to exploit cross cpu caching abilities.include/linux/slub_def.h mm/slub.c+398 -170 replies
10/16slub: Support Alien Cachesinclude/linux/slub_def.h mm/slub.c+387 -220 replies
11/16slub: Add a "touched" state to queues and partial listsinclude/linux/slub_def.h mm/slub.c+43 -180 replies
12/16slub: Cached object expirationinclude/linux/slab.h include/linux/slub_def.h mm/slab.c +2 more+395 -660 replies
13/16vmscan: Tie slub object expiration into page reclaimmm/vmscan.c+4 -00 replies
14/16slub: Reduce size of not performance critical slabsinclude/linux/slab.h mm/slub.c+18 -90 replies
15/16slub: Detailed reports on validatemm/slub.c+74 -120 replies
16/16slub: Add stats for alien allocation slowpathinclude/linux/slub_def.h mm/slub.c+8 -10 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [UnifiedV4 00/16] The Unified slab allocator (V4)

V3->V4:
- Lots of debugging
- Performance optimizations (more would be good)...
- Drop per slab locking in favor of per node locking for partial lists (queuing implies freeing large amounts of objects to per node lists of slab).
- Implement object expiration via reclaim VM logic.

The following is a release of an allocator based on SLAB and SLUB that integrates the best approaches from both allocators. The per cpu queuing is like in SLAB whereas much of the infrastructure comes from SLUB.

After this patches SLUB will track the cpu cache contents like SLAB attemped to. There are a number of architectural differences:

1. SLUB accurately tracks cpu caches instead of assuming that there is only a single cpu cache per node or system.

2. SLUB object expiration is tied into the page reclaim logic. There is no periodic cache expiration.

3. SLUB caches are dynamically configurable via the sysfs filesystem.

4. There is no per slab page metadata structure to maintain (aside from the object bitmap that usually fits into the page struct).

5. Has all the resiliency and diagnostic features of SLUB.

The unified allocator is a merging of SLUB with some queuing concepts from SLAB and a new way of managing objects in the slabs using bitmaps. Memory wise this 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) but in general does not increase space use too much.

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

Some numbers using tcp_rr on localhost

Dell R910 128G RAM, 64 processors, 4 NUMA nodes

threads unified slub slab
64 4141798 3729037 3884939
128 4146587 3890993 4105276
192 4003063 3876570 4110971
256 3928857 3942806 4099249
320 3922623 3969042 4093283
384 3827603 4002833 4108420
448 4140345 4027251 4118534
512 4163741 4050130 4122644
576 4175666 4099934 4149355
640 4190332 4142570 4175618
704 4198779 4173177 4193657
768 4662216 4200462 4222686

--
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>