Re: [PATCH RFC v3 2/8] slab: add opt-in caching layer of percpu sheaves

2025-04-22 Thread Vlastimil Babka
On 4/10/25 21:51, Suren Baghdasaryan wrote: >> +static void __pcs_flush_all_cpu(struct kmem_cache *s, unsigned int cpu) >> +{ >> + struct slub_percpu_sheaves *pcs; >> + >> + pcs = per_cpu_ptr(s->cpu_sheaves, cpu); >> + >> + /* The cpu is not executing anymore so we don't need pcs-

Re: [PATCH RFC v3 2/8] slab: add opt-in caching layer of percpu sheaves

2025-04-10 Thread Suren Baghdasaryan
On Mon, Mar 17, 2025 at 7:33 AM Vlastimil Babka wrote: > > Specifying a non-zero value for a new struct kmem_cache_args field > sheaf_capacity will setup a caching layer of percpu arrays called > sheaves of given capacity for the created cache. > > Allocations from the cache will allocate via the

Re: [PATCH RFC v3 2/8] slab: add opt-in caching layer of percpu sheaves

2025-04-03 Thread Vlastimil Babka
On 4/3/25 10:31, Harry Yoo wrote: >> +/* >> + * Bulk free objects to the percpu sheaves. >> + * Unlike free_to_pcs() this includes the calls to all necessary hooks >> + * and the fallback to freeing to slab pages. >> + */ >> +static void free_to_pcs_bulk(struct kmem_cache *s, size_t size, void **p)

Re: [PATCH RFC v3 2/8] slab: add opt-in caching layer of percpu sheaves

2025-04-03 Thread Harry Yoo
On Mon, Mar 17, 2025 at 03:33:03PM +0100, Vlastimil Babka wrote: > Specifying a non-zero value for a new struct kmem_cache_args field > sheaf_capacity will setup a caching layer of percpu arrays called > sheaves of given capacity for the created cache. > > Allocations from the cache will allocate

[PATCH RFC v3 2/8] slab: add opt-in caching layer of percpu sheaves

2025-03-17 Thread Vlastimil Babka
Specifying a non-zero value for a new struct kmem_cache_args field sheaf_capacity will setup a caching layer of percpu arrays called sheaves of given capacity for the created cache. Allocations from the cache will allocate via the percpu sheaves (main or spare) as long as they have no NUMA node pr