Re: [PATCH resend] memcg: introduce per-memcg reclaim interface
From: Johannes Weiner
Date: Fri Apr 01 2022 - 17:14:00 EST
On Fri, Apr 01, 2022 at 11:39:30AM -0700, Roman Gushchin wrote:
> The interface you're proposing is not really extensible, so we'll likely need to
> introduce a new interface like memory.reclaim_ext very soon. Why not create
> an extensible API from scratch?
>
> I'm looking at cgroup v2 documentation which describes various interface files
> formats and it seems like given the number of potential optional arguments
> the best option is nested keyed (please, refer to the Interface Files section).
>
> E.g. the format can be:
> echo "1G type=file nodemask=1-2 timeout=30s" > memory.reclaim
Yeah, that syntax looks perfect.
But why do you think it's not extensible from the current patch? We
can add those arguments one by one as we agree on them, and return
-EINVAL if somebody passes an unknown parameter.
It seems to me the current proposal is forward-compatible that way
(with the current set of keyword pararms being the empty set :-))