Re: [PATCH RFC 00/19] slab: replace cpu (partial) slabs with sheaves
From: Alexei Starovoitov
Date: Fri Oct 24 2025 - 19:57:41 EST
On Thu, Oct 23, 2025 at 6:53 AM Vlastimil Babka <vbabka@xxxxxxx> wrote:
>
> Percpu sheaves caching was introduced as opt-in but the goal was to
> eventually move all caches to them. This is the next step, enabling
> sheaves for all caches (except the two bootstrap ones) and then removing
> the per cpu (partial) slabs and lots of associated code.
>
> Besides (hopefully) improved performance, this removes the rather
> complicated code related to the lockless fastpaths (using
> this_cpu_try_cmpxchg128/64) and its complications with PREEMPT_RT or
> kmalloc_nolock().
>
> The lockless slab freelist+counters update operation using
> try_cmpxchg128/64 remains and is crucial for freeing remote NUMA objects
> without repeating the "alien" array flushing of SLUB, and to allow
> flushing objects from sheaves to slabs mostly without the node
> list_lock.
>
> This is the first RFC to get feedback. Biggest TODOs are:
>
> - cleanup of stat counters to fit the new scheme
> - integration of rcu sheaves handling with kfree_rcu batching
The whole thing looks good, and imo these two are lower priority.
> - performance evaluation
The performance results will be the key.
What kind of benchmarks do you have in mind?