summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorXiu Jianfeng <xiujianfeng@huawei.com>2024-07-03 03:36:46 +0300
committerTejun Heo <tj@kernel.org>2024-07-03 21:08:43 +0300
commit1028f391d5f9d4248e2f49193e6de2516ad630f8 (patch)
tree9b638468e910f0fc27e048229d416e5494d2ef0c /include/linux
parent7a4479680d7fd05c7a3efa87b41f421af48fbbdf (diff)
downloadlinux-1028f391d5f9d4248e2f49193e6de2516ad630f8.tar.xz
cgroup/misc: Introduce misc.peak
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. Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/misc_cgroup.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/misc_cgroup.h b/include/linux/misc_cgroup.h
index d70eab2501ee..618392d41975 100644
--- a/include/linux/misc_cgroup.h
+++ b/include/linux/misc_cgroup.h
@@ -31,11 +31,13 @@ struct misc_cg;
/**
* struct misc_res: Per cgroup per misc type resource
* @max: Maximum limit on the resource.
+ * @watermark: Historical maximum usage of the resource.
* @usage: Current usage of the resource.
* @events: Number of times, the resource limit exceeded.
*/
struct misc_res {
u64 max;
+ atomic64_t watermark;
atomic64_t usage;
atomic64_t events;
};