On Thu, May 5, 2022 at 5:13 AM Ganesan Rajagopal <rganesan@xxxxxxxxxx> wrote: > > v1 memcg exports memcg->watermark as "memory.mem_usage_in_bytes" in *max_usage_in_bytes > sysfs. This is missing for v2 memcg though "memory.current" is exported. > There is no other easy way of getting this information in Linux. > getrsuage() returns ru_maxrss but that's the max RSS of a single process > instead of the aggregated max RSS of all the processes. Hence, expose > memcg->watermark as "memory.watermark" for v2 memcg. > > Signed-off-by: Ganesan Rajagopal <rganesan@xxxxxxxxxx> Can you please explain the use-case for which you need this metric? Also note that this is not really an aggregated RSS of all the processes in the cgroup. So, do you want max RSS or max charge and for what use-case?