[PATCH v4 2/9] slab: add sheaf support for batching kfree_rcu() operations
Vlastimil Babka
vbabka at suse.cz
Thu May 15 01:45:36 PDT 2025
On 5/14/25 16:01, Vlastimil Babka wrote:
> On 5/6/25 23:34, Suren Baghdasaryan wrote:
>> On Fri, Apr 25, 2025 at 1:27 AM Vlastimil Babka <vbabka at suse.cz> wrote:
>>> @@ -2631,6 +2637,24 @@ static void sheaf_flush_unused(struct kmem_cache *s, struct slab_sheaf *sheaf)
>>> sheaf->size = 0;
>>> }
>>>
>>> +static void __rcu_free_sheaf_prepare(struct kmem_cache *s,
>>> + struct slab_sheaf *sheaf);
>>
>> I think you could safely move __rcu_free_sheaf_prepare() here and
>> avoid the above forward declaration.
>
> Right, done.
>
>>> @@ -5304,6 +5340,140 @@ bool free_to_pcs(struct kmem_cache *s, void *object)
>>> return true;
>>> }
>>>
>>> +static void __rcu_free_sheaf_prepare(struct kmem_cache *s,
>>> + struct slab_sheaf *sheaf)
>>
>> This function seems to be an almost exact copy of free_to_pcs_bulk()
>> from your previous patch. Maybe they can be consolidated?
>
> True, I've extracted it to __kmem_cache_free_bulk_prepare().
... and that was a mistake as free_to_pcs_bulk() diverges in patch 9/9 in a
way that this makes it too infeasible
More information about the maple-tree
mailing list