Re: [PATCH v2 07/16] mm/slab: replace struct partial_context with slab_alloc_context
From: Vlastimil Babka (SUSE)
Date: Mon Jun 15 2026 - 06:01:56 EST
On 6/15/26 04:36, Suren Baghdasaryan wrote:
> On Wed, Jun 10, 2026 at 11:05 PM Harry Yoo <harry@xxxxxxxxxx> wrote:
>>
>>
>>
>> On 6/11/26 12:40 AM, Vlastimil Babka (SUSE) wrote:
>> > Refactor get_from_partial_node(), get_from_any_partial(),
>> > get_from_partial() and ___slab_alloc().
>> >
>> > Remove struct partial_context, which used to be more substantial but
>> > shrank as part of the sheaves conversion. Instead pass gfp_flags and
>> > pointer to the new slab_alloc_context, which together is a superset of
>> > partial_context.
>> >
>> > This means alloc_flags are now available and we can use them to
>> > determine if spinning is allowed, further reducing false positive "not
>> > allowed" in the slow path due to gfp flags lacking __GFP_RECLAIM.
>> >
>> > Signed-off-by: Vlastimil Babka (SUSE) <vbabka@xxxxxxxxxx>
>> > ---
>>
>> Looks good to me,
>> Reviewed-by: Harry Yoo (Oracle) <harry@xxxxxxxxxx>
>
> Ah, nice! The conversion I was anticipating in the previous patch...
> I would do this removal of partial_context as patch 6 and then convert
> ___slab_alloc() and get_from_any_partial*() altogether in patch 7. I
> think that would keep the behavior of the ___slab_alloc() more robust
> throughout the patchset. But I would say it's nice to have, not a
> must-have.
OK, so I switched the order of 6 7 and all the changes from
gfpflags_allow_spinning() to alloc_flags_allow_spinning are now in the
newly-later patch; the "replace struct partial_context with
slab_alloc_context" part has no functional changes. Verified that the end
result is exactly the same, and only updated changelogs a bit.
> Reviewed-by: Suren Baghdasaryan <surenb@xxxxxxxxxx>
Thanks!
>>
>> --
>> Cheers,
>> Harry / Hyeonggon