Re: [PATCH v5 -next] cgroup/misc: Introduce misc.peak

From: Kamalesh Babulal
Date: Wed Jul 03 2024 - 05:44:49 EST




On 7/3/24 6:06 AM, Xiu Jianfeng wrote:
> Introduce misc.peak to record the historical maximum usage of the
> resource, as in some scenarios the value of misc.max could be
> adjusted based on the peak usage of the resource.
>

[...]

> /**
> * misc_cg_capacity_show() - Show the total capacity of misc res on the host.
> * @sf: Interface file
> @@ -357,6 +394,10 @@ static struct cftype misc_cg_files[] = {
> .name = "current",
> .seq_show = misc_cg_current_show,
> },
> + {
> + .name = "peak",
> + .seq_show = misc_cg_peak_show,
> + },
> {
> .name = "capacity",
> .seq_show = misc_cg_capacity_show,


The patch looks good to me after the atomic conversion. Sorry for bringing up
this question so late into the discussion. Given that misc.max is available
only for non-root cgroups, does it make sense for misc.peak too, available
for non-root cgroups only?

--
Thanks,
Kamalesh