[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ce289766-6d7d-427a-b9bb-8cb3634dbe9b@suse.cz>
Date: Tue, 26 Aug 2025 10:51:34 +0200
From: Vlastimil Babka <vbabka@...e.cz>
To: Suren Baghdasaryan <surenb@...gle.com>
Cc: "Liam R. Howlett" <Liam.Howlett@...cle.com>,
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>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, rcu@...r.kernel.org,
maple-tree@...ts.infradead.org
Subject: Re: [PATCH v5 01/14] slab: add opt-in caching layer of percpu sheaves
On 8/19/25 06:19, Suren Baghdasaryan wrote:
>> @@ -5624,20 +6561,29 @@ static int init_kmem_cache_nodes(struct kmem_cache *s)
>>
>> for_each_node_mask(node, slab_nodes) {
>> struct kmem_cache_node *n;
>> + struct node_barn *barn = NULL;
>>
>> if (slab_state == DOWN) {
>> early_kmem_cache_node_alloc(node);
>> continue;
>> }
>> +
>> + if (s->cpu_sheaves) {
>> + barn = kmalloc_node(sizeof(*barn), GFP_KERNEL, node);
>> +
>> + if (!barn)
>> + return 0;
>> + }
>> +
>> n = kmem_cache_alloc_node(kmem_cache_node,
>> GFP_KERNEL, node);
>> -
>> if (!n) {
>> - free_kmem_cache_nodes(s);
>
> Why do you skip free_kmem_cache_nodes() here?
It's not necessary as the caller will perform __kmem_cache_release() which
calls free_kmem_cache_nodes()
I have incorporated your other suggestions, thanks!
Powered by blists - more mailing lists