Commit b0335752 authored by Chunguang Xu's avatar Chunguang Xu Committed by Tejun Heo
Browse files

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: default avatarChunguang Xu <brookxu@tencent.com>
Reviewed-by: default avatarMichal Koutný <mkoutny@suse.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent f279294b
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -37,7 +37,6 @@ struct misc_res {
	unsigned long max;
	atomic_long_t usage;
	atomic_long_t events;
	bool failed;
};

/**
+0 −7
Original line number Diff line number Diff line
@@ -157,13 +157,6 @@ int misc_cg_try_charge(enum misc_res_type type, struct misc_cg *cg,
		new_usage = atomic_long_add_return(amount, &res->usage);
		if (new_usage > READ_ONCE(res->max) ||
		    new_usage > READ_ONCE(misc_res_capacity[type])) {
			if (!res->failed) {
				pr_info("cgroup: charge rejected by the misc controller for %s resource in ",
					misc_res_name[type]);
				pr_cont_cgroup_path(i->css.cgroup);
				pr_cont("\n");
				res->failed = true;
			}
			ret = -EBUSY;
			goto err_charge;
		}