SLUB: The Unified slab allocator (V3)
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest23 patches 23 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/23 | percpu: make @dyn_size always mean min dyn_size in first chunk init functionsinclude/ mm/ | +11 | 0 replies | |
| 2/23 | percpu: allow limited allocation before slab is onlineinclude/ init/ mm/ | +54 | 0 replies | |
| 3/23 | slub: Use a constant for a unspecified node.mm/ | +7 | 3 replies | |
| 4/23 | SLUB: Constants need ULmm/ | +2 | 0 replies | |
| 5/23 | Subjec Slub: Force no inlining of debug functionsmm/ | +3 | 0 replies | |
| 6/23 | slub: Check kasprintf results in kmem_cache_init()mm/ | +6 | 0 replies | |
| 7/23 | slub: Use kmem_cache flags to detect if slab is in debugging mode.include/ mm/ | +12 | 0 replies | |
| 8/23 | slub: remove dynamic dma slab allocationmm/ | +40 | 0 replies | |
| 9/23 | slub: Remove static kmem_cache_cpu array for bootmm/ | +4 | 0 replies | |
| 10/23 | slub: Allow removal of slab caches during boot V2mm/ | +15 | 0 replies | |
| 11/23 | slub: Dynamically size kmalloc cache allocationsinclude/ mm/ | +139 | 0 replies | |
| 12/23 | slub: Extract hooks for memory checkers from hotpathsmm/ | +38 | 0 replies | |
| 13/23 | slub: Move gfpflag masking out of the hotpathmm/ | +3 | 0 replies | |
| 14/23 | slub: Add SLAB style per cpu queueinginclude/ include/ init/ +1 more | +534 | 0 replies | |
| 15/23 | slub: Allow resizing of per cpu queuesinclude/ mm/ | +200 | 0 replies | |
| 16/23 | slub: Get rid of useless function count_free()mm/ | +3 | 0 replies | |
| 17/23 | slub: Remove MAX_OBJS limitationinclude/ mm/ | +1 | 0 replies | |
| 18/23 | slub: Drop allocator announcementmm/ | +0 | 0 replies | |
| 19/23 | slub: Object based NUMA policiesinclude/ mm/ | +73 | 0 replies | |
| 20/23 | slub: Shared cache to exploit cross cpu caching abilities.include/ mm/ | +405 | 7 replies | |
| 21/23 | slub: Support Alien Cachesinclude/ mm/ | +327 | 0 replies | |
| 22/23 | slub: Cached object expirationinclude/ include/ mm/ | +238 | 0 replies | |
| 23/23 | vmscan: Tie slub object expiration into page reclaimmm/ | +4 | 0 replies |
Reviews trailers per patch
3 of 23 patches have a Reviewed-by or Acked-by.
| Patch | David Rientjes |
|---|---|
| 1/23 | A-b |
| 2/23 | |
| 3/23 | |
| 4/23 | A-b |
| 5/23 | |
| 6/23 | |
| 7/23 | A-b |
| 8/23 | |
| 9/23 | |
| 10/23 | |
| 11/23 | |
| 12/23 | |
| 13/23 | |
| 14/23 | |
| 15/23 | |
| 16/23 | |
| 17/23 | |
| 18/23 | |
| 19/23 | |
| 20/23 | |
| 21/23 | |
| 22/23 | |
| 23/23 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [S+Q3 00/23] SLUB: The Unified slab allocator (V3)
The following is a first release of an allocator based on SLAB and SLUB that integrates the best approaches from both allocators. The per cpu queuing is like the two prior releases. The NUMA facilities were much improved vs V2. Shared and alien cache support was added to track the cache hot state of objects.
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. Keeps all the other good features of SLUB as well.
SLUB+Q 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) but in general does not increase space use too much.
The SLAB scheme of not touching the object during management is adopted. SLUB+Q can efficiently free and allocate cache cold objects without causing cache misses.
I have had limited time for benchmarking this release so far since I was more focused on getting SLAB features merged in and making it work reliably with all the usual SLUB bells and whistles. The queueing scheme from the SLUB+Q V1/V2 releases was not changed so that the basic SMP performance is still the same. V1 and V2 did not have NUMA clean queues and therefore the performance on NUMA system was not great.
Since the basic queueing scheme from SLAB was taken we should be seeing similar or better performance on NUMA. But then I am limited to two node systems at this point. For those systems the alien caches are allocated of similar size than the shared caches. Meaning that more optimizations will now be geared to small NUMA systems.
Patches against 2.6.35
1,2 Some percpu stuff that I hope will independently be merged in the 2.6.36
cycle.
3-13 Cleanup patches for SLUB that are general improvements. Some of those
are already in the slab tree for 2.6.36.
14-18 Minimal set that realizes per cpu queues without fancy shared or alien
queues. This should be enough to be competitive with SMP against SLAB on modern hardware as the earlier measurements show.
19 NUMA policies applied at the object level. This will cause significantly
more processing in the allocator hotpath for the NUMA case on particular slabs so that individual allocations can be redirected to different nodes.
20 Shared caches per cache sibling group between processors.
21 Alien caches per cache sibling group. Just adds a couple of
shared caches and uses them for foreign nodes.
22 Cache expiration
23 Expire caches from page reclaim logic in mm/vmscan.c
--
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>