[PATCH RFC v2 02/10] slab: add sheaf support for batching kfree_rcu() operations

Vlastimil Babka vbabka at suse.cz
Wed Mar 12 09:16:46 PDT 2025


On 2/24/25 09:40, Harry Yoo wrote:
>> +static bool kfree_rcu_sheaf(void *obj)
>> +{
>> +	struct kmem_cache *s;
>> +	struct folio *folio;
>> +	struct slab *slab;
>> +
>> +	folio = virt_to_folio(obj);
>> +	if (unlikely(!folio_test_slab(folio)))
>> +		return false;
> 
> Does virt_to_folio() work for vmalloc addresses?

Hm, no. Good catch.

> Probably it should check is_vmalloc_addr() first?

Yes, thanks!

> Otherwise look good to me.
> 



More information about the maple-tree mailing list