Re: [PATCH 2/4] mm/memcg: make memory.reclaim interface generic
From: Davidlohr Bueso
Date: Mon Jun 23 2025 - 19:37:03 EST
On Mon, 23 Jun 2025, Andrew Morton wrote:
On Mon, 23 Jun 2025 11:58:49 -0700 Davidlohr Bueso <dave@xxxxxxxxxxxx> wrote:
This adds a general call for both parsing as well as the
common reclaim semantics. memcg is still the only user and
no change in semantics.
+int user_proactive_reclaim(char *buf,
+ struct mem_cgroup *memcg, pg_data_t *pgdat);
Feeling nitty, is this a good name for it? It's hard to imagine what a
function called "user_proactive_reclaim" actually does.
I'm open to another name, sure. But imo the chosen one is actually pretty
descriptive: you know it's coming from userspace (justifying the 'buf'),
you know this is not about memory pressure and the memcg/pgdat parameters
tell the possible interfaces. Would prefixing a 'do_' be any better?
That it isn't documented isn't helpful either!
I had done this but felt rather redundant and unnecessary, and further
don't expect for it go gain any other users. But ok, will add.
Thanks,
Davidlohr