summaryrefslogtreecommitdiff
path: root/include/linux/misc_cgroup.h
diff options
context:
space:
mode:
authorChunguang Xu <brookxu@tencent.com>2021-09-17 20:44:14 +0800
committerTejun Heo <tj@kernel.org>2021-09-20 07:35:38 -1000
commitf279294b329363eb6ada568e494d609ef78e3e8e (patch)
tree12c5a7205270ba787ef51a89b7cb24f7ad7ea598 /include/linux/misc_cgroup.h
parentc0002d11d79900f8aa5c8375336434940d6afedf (diff)
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/linux/misc_cgroup.h')
-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];
};