Skip to content

slub: per cpu partial lists V4

Christoph Lameter lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7slub: free slabs without holding locks (V2)mm/slub.c+13 -132 replies
2/7slub: Remove useless statements in __slab_allocmm/slub.c+0 -42 replies
3/7slub: Prepare inuse field in new_slab()mm/slub.c+2 -30 replies
4/7slub: pass kmem_cache_cpu pointer to get_partial()mm/slub.c+15 -150 replies
5/7slub: return object pointer from get_partial() / new_slab().mm/slub.c+73 -600 replies
6/7slub: per cpu cache for partial pagesinclude/linux/mm_types.h include/linux/slub_def.h mm/slub.c+309 -484 replies
7/7slub: update slabinfo tools to report per cpu partial list statisticstools/slub/slabinfo.c+8 -00 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [slub p4 0/7] slub: per cpu partial lists V4

V3->V4 : Use a single linked per cpu list instead of a per cpu array.
This results in improvements even for the single threaded case. I think this is ready for more widespread testing (-next?) The number of partial pages per cpu is configurable via /sys/kernel/slab/<name>/cpu_partial

V2->V3 : Work on the todo list. Still some work to be done to reduce
code impact and make this all cleaner. (Pekka: patch 1-3 are cleanup patches of general usefulness. You got #1 already 2+3 could be picked up w/o any issue).

The following patchset introduces per cpu partial lists which allow a performance increase of around ~10-20% with hackbench on my Sandybridge processor.

These lists help to avoid per node locking overhead. Allocator latency could be further reduced by making these operations work without disabling interrupts (like the fastpath and the free slowpath) but that is another project.

It is interesting to note that BSD has gone to a scheme with partial pages only per cpu (source: Adrian). Transfer of cpu ownerships is done using IPIs. Probably too much overhead for our taste. The approach here keeps the per node partial lists essentially meaning the "pages" in there have no cpu owner.