On Wed 17-07-24 10:24:07, David Finkel wrote:
On Wed, Jul 17, 2024 at 2:26 AM Michal Hocko mhocko@suse.com wrote:
On Tue 16-07-24 18:06:17, David Finkel wrote:
[...]
I'm thinking of something like "global_reset\n", so if we do something like the PSI interface later, users can write "fd_local_reset\n", and get that nicer behavior.
This also has the benefit of allowing "echo global_reset > /sys/fs/cgroup/.../memory.peak" to do the right thing. (better names welcome)
This would be a different behavior than in v1 and therefore confusing for those who rely on this in v1 already. So I wouldn't overengineer it and keep the semantic as simple as possible. If we decide to add PSI triggers they are completely independent on peak value because that is reclaim based interface which by definition makes peak value very dubious.
That's fair.
My only thought is that "write any non-empty string", is a very wide interface to support, and limits other possible behaviors later.
yes, that ship has sailed long time ago.