Re: [PATCH RFC v2 12/20] slab: remove defer_deactivate_slab()
From: Vlastimil Babka
Date: Thu Jan 15 2026 - 09:47:53 EST
On 1/15/26 15:09, Hao Li wrote:
>> --- a/mm/slub.c
>> +++ b/mm/slub.c
>> @@ -3248,7 +3248,7 @@ static struct slab *new_slab(struct kmem_cache *s, gfp_t flags, int node)
>> flags & (GFP_RECLAIM_MASK | GFP_CONSTRAINT_MASK), node);
>> }
>>
>> -static void __free_slab(struct kmem_cache *s, struct slab *slab)
>> +static void __free_slab(struct kmem_cache *s, struct slab *slab, bool allow_spin)
>> {
>> struct page *page = slab_page(slab);
>> int order = compound_order(page);
>> @@ -3262,11 +3262,20 @@ static void __free_slab(struct kmem_cache *s, struct slab *slab)
>> free_frozen_pages(page, order);
>
> Here we missed using the newly added allow_spin.
> It should call free_frozen_pages_nolock() when !allow_spin.
Uh damn, the first RFC had it correct. Where did I screw up with git? Sigh.
Thanks!