All of lore.kernel.org
 help / color / mirror / Atom feed
From: brookxu <brookxu.cn@gmail.com>
To: "Michal Koutný" <mkoutny@suse.com>
Cc: tj@kernel.org, lizefan.x@bytedance.com, hannes@cmpxchg.org,
	vipinsh@google.com, corbet@lwn.net, linux-kernel@vger.kernel.org,
	cgroups@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH v3 2/3] misc_cgroup: remove error log to avoid log flood
Date: Fri, 17 Sep 2021 09:56:26 +0800	[thread overview]
Message-ID: <eece1309-4c1e-909a-22ea-3db31ad7a1da@gmail.com> (raw)
In-Reply-To: <20210916175711.GA12643@blackbody.suse.cz>

Thanks for your time.

Michal Koutný wrote on 2021/9/17 1:57 上午:
> On Wed, Sep 15, 2021 at 10:18:50AM +0800, brookxu <brookxu.cn@gmail.com> wrote:
>> In scenarios where containers are frequently created and deleted,
>> a large number of error logs maybe generated. This log provides
>> less information, we can get more detailed info from misc.events.
> 
> IIUC, the log provides equal information (with persistence), no?
> 
>> diff --git a/kernel/cgroup/misc.c b/kernel/cgroup/misc.c
>> index 4b2b492..fe3e8a0 100644
>> --- a/kernel/cgroup/misc.c
>> +++ b/kernel/cgroup/misc.c
>> @@ -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;
>> -			}
> 
> As I argued previously, reporting this as "in" `i` cgroup instead
> of `cg` is not that useful and equivalent to the misc.events:*.max now,
> so the drop is appropriate.
> 
> The change/patch is OK,
> Reviewed-by: Michal Koutný <mkoutny@suse.com>
> 
> The commit message might be fixed (if you agree with remark).

Yeah, maybe we should make it more clearly, What do you think of
the commit below:

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.event has provided relevant
information, maybe we can remove this log.


> 

  reply	other threads:[~2021-09-17  1:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-15  2:18 [PATCH v3 1/3] misc_cgroup: introduce misc.events to count failures brookxu
2021-09-15  2:18 ` [PATCH v3 2/3] misc_cgroup: remove error log to avoid log flood brookxu
2021-09-15  2:18   ` brookxu
2021-09-16 17:57   ` Michal Koutný
2021-09-17  1:56     ` brookxu [this message]
2021-09-17  8:09       ` Michal Koutný
2021-09-15  2:18 ` [PATCH v3 3/3] docs/cgroup: add entry for misc.events brookxu
2021-09-16 17:47   ` Michal Koutný
2021-09-15 17:04 ` [PATCH v3 1/3] misc_cgroup: introduce misc.events to count failures Vipin Sharma
2021-09-16 17:47 ` Michal Koutný

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=eece1309-4c1e-909a-22ea-3db31ad7a1da@gmail.com \
    --to=brookxu.cn@gmail.com \
    --cc=cgroups@vger.kernel.org \
    --cc=corbet@lwn.net \
    --cc=hannes@cmpxchg.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan.x@bytedance.com \
    --cc=mkoutny@suse.com \
    --cc=tj@kernel.org \
    --cc=vipinsh@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.