summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChunguang Xu <brookxu@tencent.com>2021-09-17 15:44:14 +0300
committerTejun Heo <tj@kernel.org>2021-09-20 20:35:38 +0300
commitf279294b329363eb6ada568e494d609ef78e3e8e (patch)
tree12c5a7205270ba787ef51a89b7cb24f7ad7ea598 /include
parentc0002d11d79900f8aa5c8375336434940d6afedf (diff)
downloadlinux-f279294b329363eb6ada568e494d609ef78e3e8e.tar.xz
misc_cgroup: introduce misc.events to count failures
Introduce misc.events to make it easier for us to understand the pressure of resources. Currently only the 'max' event is implemented, which indicates the times the resource is about to exceeds the max limit. Signed-off-by: Chunguang Xu <brookxu@tencent.com> Reviewed-by: Vipin Sharma <vipinsh@google.com> Reviewed-by: Michal Koutný <mkoutny@suse.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/misc_cgroup.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/misc_cgroup.h b/include/linux/misc_cgroup.h
index da2367e2ac1e..091f2d2a1aec 100644
--- a/include/linux/misc_cgroup.h
+++ b/include/linux/misc_cgroup.h
@@ -36,6 +36,7 @@ struct misc_cg;
struct misc_res {
unsigned long max;
atomic_long_t usage;
+ atomic_long_t events;
bool failed;
};
@@ -46,6 +47,10 @@ struct misc_res {
*/
struct misc_cg {
struct cgroup_subsys_state css;
+
+ /* misc.events */
+ struct cgroup_file events_file;
+
struct misc_res res[MISC_CG_RES_TYPES];
};