[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5153dc10-c041-4283-9722-b93a76c44a20@suse.cz>
Date: Mon, 15 Dec 2025 16:20:20 +0100
From: Vlastimil Babka <vbabka@...e.cz>
To: Hao Li <hao.li@...ux.dev>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Christoph Lameter <cl@...two.org>, David Rientjes <rientjes@...gle.com>,
Roman Gushchin <roman.gushchin@...ux.dev>, Harry Yoo <harry.yoo@...cle.com>,
Uladzislau Rezki <urezki@...il.com>,
"Liam R. Howlett" <Liam.Howlett@...cle.com>,
Suren Baghdasaryan <surenb@...gle.com>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Alexei Starovoitov <ast@...nel.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, linux-rt-devel@...ts.linux.dev,
bpf@...r.kernel.org, kasan-dev@...glegroups.com
Subject: Re: [PATCH RFC 06/19] slab: introduce percpu sheaves bootstrap
On 12/15/25 13:17, Hao Li wrote:
> On Thu, Oct 23, 2025 at 03:52:28PM +0200, Vlastimil Babka wrote:
>> @@ -8608,12 +8656,10 @@ int do_kmem_cache_create(struct kmem_cache *s, const char *name,
>>
>> set_cpu_partial(s);
>>
>> - if (s->sheaf_capacity) {
>> - s->cpu_sheaves = alloc_percpu(struct slub_percpu_sheaves);
>> - if (!s->cpu_sheaves) {
>> - err = -ENOMEM;
>> - goto out;
>> - }
>> + s->cpu_sheaves = alloc_percpu(struct slub_percpu_sheaves);
>
> After this change, all SLUB caches enable cpu_sheaves; therefore,
> slab_unmergeable() will always return 1.
>
> int slab_unmergeable(struct kmem_cache *s)
> {
> ...
> if (s->cpu_sheaves)
> return 1;
> ...
> }
>
> Maybe we need to update slab_unmergeable() accordingly..
Yes, I meant to do that but seems I forgot. Thanks for the reminder!
>> + if (!s->cpu_sheaves) {
>> + err = -ENOMEM;
>> + goto out;
>> }
>>
>> #ifdef CONFIG_NUMA
>> @@ -8632,11 +8678,9 @@ int do_kmem_cache_create(struct kmem_cache *s, const char *name,
>> if (!alloc_kmem_cache_cpus(s))
>> goto out;
>>
>> - if (s->cpu_sheaves) {
>> - err = init_percpu_sheaves(s);
>> - if (err)
>> - goto out;
>> - }
>> + err = init_percpu_sheaves(s);
>> + if (err)
>> + goto out;
>>
>> err = 0;
>>
>>
>> --
>> 2.51.1
>>
Powered by blists - more mailing lists