Re: [PATCH] mm/vmscan: reclaim every zone in per-node proactive reclaim
From: Michal Hocko
Date: Tue Oct 20 2026 - 16:36:06 EST
On Tue 20-10-26 15:58:53, Gregory Price (Meta) wrote:
> On 2026-10-20 09:49 +0200, Michal Hocko wrote:
> >
> > Would it make more sense to
> > diff --git a/mm/vmscan.c b/mm/vmscan.c
> > index f11491ee9ed5..e07db9514e59 100644
> > --- a/mm/vmscan.c
> > +++ b/mm/vmscan.c
> > @@ -7963,7 +7963,7 @@ int user_proactive_reclaim(char *buf,
> > int swappiness = -1;
> > char *old_buf, *start;
> > substring_t args[MAX_OPT_ARGS];
> > - gfp_t gfp_mask = GFP_KERNEL;
> > + gfp_t gfp_mask = GFP_HIGHUSER_MOVABLE;
> >
> > if (!buf || (!memcg && !pgdat) || (memcg && pgdat))
> > return -EINVAL;
> >
> > That would take care of try_to_free_mem_cgroup_pages too.
>
> funny enough, try_to_free_mem_cgroup_pages does what my patch does:
>
> struct scan_control sc = {
> .reclaim_idx = MAX_NR_ZONES - 1,
>
>
> now, whether the gfp_mask should be GFP_KERNEL, that's a different
> question i think.
>
> (tl;dr i think my patch is still correct)
Ohh, right, I forgot that memcg reclaim always reclaims all zones.
Tweaking the mask seems more consistent but not something I will insist
on. Up to you which way to go. In any case
Acked-by: Michal Hocko <mhocko@xxxxxxxx>
--
Michal Hocko
SUSE Labs