On Mon, Dec 15, 2025 at 05:14:07PM +1100, Balbir Singh wrote:
> On 11/13/25 06:29, Gregory Price wrote:
> > @@ -2829,10 +2829,9 @@ enum compact_result try_to_compact_pages(gfp_t 
> > gfp_mask, unsigned int order,
> >                                     ac->highest_zoneidx, ac->nodemask) {
> >             enum compact_result status;
> >  
> > -           if (cpusets_enabled() &&
> > -                   (alloc_flags & ALLOC_CPUSET) &&
> > -                   !__cpuset_zone_allowed(zone, gfp_mask))
> > -                           continue;
> > +           if ((alloc_flags & ALLOC_CPUSET) &&
> > +               !cpuset_zone_allowed(zone, gfp_mask))
> > +                   continue;
> >  
> 
> Shouldn't this become one inline helper -- alloc_flags and 
> cpuset_zone_allowed.
>

I actually went back and took a look at this code and I think there was
a corner case I missed by re-ordering cpusets_enabled and ALLOC_CPUSET
when the GFP flag was added.

I will take another look here and see if it can't be fully abstracted
into a helper, but i remember thinking to myself "Damn, i have to open
code this to deal with the cpusets_disabled case".

Will double check on next version.

> Balbir
> <snip>

Reply via email to