Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

misc_cgroup: remove error log to avoid log flood

In scenarios where containers are frequently created and deleted,
a large number of error logs maybe generated. The logs only show
which node is about to go over the max limit, not the node which
resource request failed. As misc.events has provided relevant
information, maybe we can remove this log.

Signed-off-by: Chunguang Xu <brookxu@tencent.com>
Reviewed-by: Michal Koutný <mkoutny@suse.com>
Signed-off-by: Tejun Heo <tj@kernel.org>

authored by

Chunguang Xu and committed by
Tejun Heo
b0335752 f279294b

-8
-1
include/linux/misc_cgroup.h
··· 37 37 unsigned long max; 38 38 atomic_long_t usage; 39 39 atomic_long_t events; 40 - bool failed; 41 40 }; 42 41 43 42 /**
-7
kernel/cgroup/misc.c
··· 157 157 new_usage = atomic_long_add_return(amount, &res->usage); 158 158 if (new_usage > READ_ONCE(res->max) || 159 159 new_usage > READ_ONCE(misc_res_capacity[type])) { 160 - if (!res->failed) { 161 - pr_info("cgroup: charge rejected by the misc controller for %s resource in ", 162 - misc_res_name[type]); 163 - pr_cont_cgroup_path(i->css.cgroup); 164 - pr_cont("\n"); 165 - res->failed = true; 166 - } 167 160 ret = -EBUSY; 168 161 goto err_charge; 169 162 }