Linux 7.0 aims to replace more cache code with sheaves to “hopefully” improve performance

Introduced into the mainline Linux kernel last year: “sheaves” as an opt-in per-CPU array-based cache layer. Thieves is Merged back into Linux 6.18 It started as an opt-in caching layer, but The plan is to replace more CPU slabs/caches with thieves. Planned introduction in the next Linux 7.0 cycle is to replace many of these caches with sieves.

This week I stood in line. slab/for-next Git branch of slab.git This is a patch that replaces a partial CPU slab with a sieve.

Vlastimil Babka is a SUSE engineer and SLAB maintainer. Recent patch series As:

“Although the Percpu sieve cache was introduced as an opt-in, the goal was to eventually move all caches there. This is the next step to enable sieves on all caches (except the two bootstrap caches), removing per-CPU (partial) slabs and a lot of associated code.

In addition to (hopefully) improving performance, this removes the fairly complex code associated with the lockless fast path (using this_cpu_try_cmpxchg128/64) and the complexity with PREEMPT_RT or kmalloc_nolock().

The lockless slab freelist+counters update operation with try_cmpxchg128/64 remains and is important for freeing remote NUMA objects without repeating the flushing of SLUB’s “alien” arrays and allowing objects to be flushed from the sieve to the slab with little use of node list_lock.

We are submitting this v4 as the branch has accumulated various changes due to review and subsequent publishing (see list below). Thank you for all the reviews! ”

Per-CPU fractional caching was used to speed up object allocation and freeing, but is now removed by sieves.

While it “hopefully” improves performance, there are no numbers quantifying the possible performance impact of using this enlarged sieve.

These patches were first staged in slab/for-7.0/sheaves and are now in slab/for-next, so work should be submitted in February as part of the Linux 6.20-7.0 cycle. Barring any last minute issues this will be expanded bundle Use with the following mainline kernel versions:

Latest Update