Re: [PATCH v2 07/16] mm/slab: replace struct partial_context with slab_alloc_context

From: Suren Baghdasaryan

Date: Sun Jun 14 2026 - 22:36:58 EST


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.

Reviewed-by: Suren Baghdasaryan <surenb@xxxxxxxxxx>

>
> --
> Cheers,
> Harry / Hyeonggon