Re: [PATCH v5 1/2] mm, memcg: cg2 memory{.swap,}.peak write handlers

2024-07-29 Thread David Finkel
Hi Michal, On Fri, Jul 26, 2024 at 10:16 AM Michal Koutný wrote: > > Hello David. > > On Wed, Jul 24, 2024 at 12:19:41PM GMT, David Finkel wrote: > > Writing a specific string to the memory.peak and memory.swap.peak > > pseudo-files reset the high watermark to the current usage for > > subsequen

Re: [PATCH v5 1/2] mm, memcg: cg2 memory{.swap,}.peak write handlers

2024-07-26 Thread Michal Koutný
Hello David. On Wed, Jul 24, 2024 at 12:19:41PM GMT, David Finkel wrote: > Writing a specific string to the memory.peak and memory.swap.peak > pseudo-files reset the high watermark to the current usage for > subsequent reads through that same fd. This is elegant and nice work! (Caught my attenti

[PATCH v5 1/2] mm, memcg: cg2 memory{.swap,}.peak write handlers

2024-07-24 Thread David Finkel
Other mechanisms for querying the peak memory usage of either a process or v1 memory cgroup allow for resetting the high watermark. Restore parity with those mechanisms, but with a less racy API. For example: - Any write to memory.max_usage_in_bytes in a cgroup v1 mount resets the high waterma

[PATCH v5 1/2] mm, memcg: cg2 memory{.swap,}.peak write handlers

2024-07-24 Thread David Finkel
This patch revision addresses a few comments from Longman and Johannes here[1], and rebases onto master again. (I still have issues with starting my UML instance to run the tests. I'll see if I an figure out what's going on with that after I get some other work done today) [1]: https://lore.kern