Re: [PATCH RFC v2 01/10] slab: add opt-in caching layer of percpu sheaves

2025-03-17 Thread Vlastimil Babka
On 3/12/25 16:14, Suren Baghdasaryan wrote: > On Wed, Mar 12, 2025 at 7:58 AM Vlastimil Babka wrote: >> > I find the program flow in this function quite complex and hard to >> > follow. I think refactoring the above block starting from "pcs = >> > this_cpu_ptr(s->cpu_sheaves)" would somewhat simpl

Re: [PATCH RFC v2 01/10] slab: add opt-in caching layer of percpu sheaves

2025-03-12 Thread Suren Baghdasaryan
On Wed, Mar 12, 2025 at 7:58 AM Vlastimil Babka wrote: > > On 2/22/25 23:46, Suren Baghdasaryan wrote: > > On Fri, Feb 14, 2025 at 8:27 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 a

Re: [PATCH RFC v2 01/10] slab: add opt-in caching layer of percpu sheaves

2025-03-12 Thread Vlastimil Babka
On 2/24/25 09:04, Harry Yoo wrote: >> +static void barn_shrink(struct kmem_cache *s, struct node_barn *barn) >> +{ >> +struct list_head empty_list; >> +struct list_head full_list; >> +struct slab_sheaf *sheaf, *sheaf2; >> +unsigned long flags; >> + >> +INIT_LIST_HEAD(&empty_list

Re: [PATCH RFC v2 01/10] slab: add opt-in caching layer of percpu sheaves

2025-03-12 Thread Vlastimil Babka
On 2/22/25 23:46, Suren Baghdasaryan wrote: > On Fri, Feb 14, 2025 at 8:27 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. >>

Re: [PATCH RFC v2 01/10] slab: add opt-in caching layer of percpu sheaves

2025-02-24 Thread Harry Yoo
On Fri, Feb 14, 2025 at 05:27:37PM +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

Re: [PATCH RFC v2 01/10] slab: add opt-in caching layer of percpu sheaves

2025-02-22 Thread Suren Baghdasaryan
On Sat, Feb 22, 2025 at 2:46 PM Suren Baghdasaryan wrote: > > On Fri, Feb 14, 2025 at 8:27 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 t

Re: [PATCH RFC v2 01/10] slab: add opt-in caching layer of percpu sheaves

2025-02-22 Thread Suren Baghdasaryan
On Fri, Feb 14, 2025 at 8:27 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