Skip to content

slub: RFC lockless allocation paths V1

Christoph Lameter linux-mm 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest12 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12slub: free slabs without holding locks (V2)mm/slub.c+13 -130 replies
2/12slub: Remove useless statements in __slab_allocmm/slub.c+0 -40 replies
3/12slub: Get rid of the node fieldinclude/linux/slub_def.h mm/slub.c+5 -80 replies
4/12slub: Separate out kmem_cache_cpu processing from deactivate_slabmm/slub.c+12 -120 replies
5/12slub: Extract get_freelist from __slab_allocmm/slub.c+32 -250 replies
6/12slub: Use freelist instead of "object" in __slab_allocmm/slub.c+17 -120 replies
7/12slub: pass page to node_match() instead of kmem_cache_cpu structuremm/slub.c+6 -40 replies
8/12slub: enable use of deactivate_slab with interrupts onmm/slub.c+6 -50 replies
9/12slub: Run deactivate_slab with interrupts enabledmm/slub.c+3 -20 replies
10/12slub: Enable use of get_partial with interrupts enabledmm/slub.c+3 -20 replies
11/12slub: Remove kmem_cache_cpu dependency from acquire slabmm/slub.c+15 -260 replies
12/12slub: Drop page field from kmem_cache_cpumm/slub.c+92 -480 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [slub rfc1 00/12] slub: RFC lockless allocation paths V1

Draft of a patchset to make the allocation paths lockless as well.

I have done just a hackbench test on this to make sure that it works. Various additional overhead is added to the fastpaths so this may require additional work before it becomes mergeable.

The first two patches are cleanup patches that have been posted a couple of times. Those can be merged.

The basic principle is to use double word atomic allocations to check lists of objects in and out of the per cpu structures and the per page structures.

Since we can only handle two words atomically we need to reduce the state being kept for per cpu queues. Thus the page and the node field in kmem_cache_cpu have to be dropped. Both of those values can be determined from an object pointer after all but the calculation of those values impacts the performance of the allocator. Not sure what the impact is. Could be offset by the removal of the overhead for interrupt disabling/enabling and the code savings because the per cpu state for queueing is much less.

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>