Re: [PATCH 2/4] mm/memcg: make memory.reclaim interface generic
From: Andrew Morton
Date: Thu Jul 17 2025 - 18:53:03 EST
On Thu, 17 Jul 2025 15:17:09 -0700 Shakeel Butt <shakeel.butt@xxxxxxxxx> wrote:
> On Mon, Jun 23, 2025 at 11:58:49AM -0700, Davidlohr Bueso wrote:
> > +
> > +int user_proactive_reclaim(char *buf, struct mem_cgroup *memcg, pg_data_t *pgdat)
> > +{
> > + unsigned int nr_retries = MAX_RECLAIM_RETRIES;
> > + unsigned long nr_to_reclaim, nr_reclaimed = 0;
> > + int swappiness = -1;
> > + char *old_buf, *start;
> > + substring_t args[MAX_OPT_ARGS];
> > +
> > + if (!buf || (!memcg && !pgdat))
>
> I don't think this series is adding a use-case where both memcg and
> pgdat are non-NULL, so let's error out on that as well.
As a followup, please. This has been in -next for four weeks and I'd
prefer not to have to route around it (again).