All of lore.kernel.org
 help / color / mirror / Atom feed
From: brookxu <brookxu.cn@gmail.com>
To: Vipin Sharma <vipinsh@google.com>, Tejun Heo <tj@kernel.org>
Cc: lizefan.x@bytedance.com, hannes@cmpxchg.org, mkoutny@suse.com,
	corbet@lwn.net, linux-kernel@vger.kernel.org,
	cgroups@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH v2 1/3] misc_cgroup: introduce misc.events and misc_events.local
Date: Tue, 14 Sep 2021 10:23:13 +0800	[thread overview]
Message-ID: <b62597e9-72c4-563e-fdc7-3315569502f0@gmail.com> (raw)
In-Reply-To: <CAHVum0dmTULvzD6dhr4Jzow-M1ATi-ubDkO5wQR=RQmWtt_78w@mail.gmail.com>

Thanks for your time.

Vipin Sharma wrote on 2021/9/14 12:51 上午:
> On Sun, Sep 12, 2021 at 10:01 PM brookxu <brookxu.cn@gmail.com> wrote:
>>
>> From: Chunguang Xu <brookxu@tencent.com>
>>
>> Introduce misc.events and misc.events.local to make it easier for
> 
> I thought Tejun only gave go ahead for misc.events and not for
> misc.events.local.
> 

Maybe I missed something. I think events.local is somewhat useful. For
example, the events of node A is large. If we need to determine whether
it is caused by the max of node A, if there is no events.local, then we
need to traverse the events of the child nodes and compare them with
node A. This is a bit complicated. If there is events.local, we can do
it very easily. Should we keep the events.local interface?

>> us to understand the pressure of resources. The main idea comes
>> from mem_cgroup. Currently only the 'max' event is implemented,
>> which indicates the times the resource exceeds the limit.
>>
> 
> For future emails, please provide the links to previous discussions
> like [1], [2],...
> 
>> @@ -36,6 +41,8 @@ enum misc_res_type {
>>  struct misc_res {
>>         unsigned long max;
>>         atomic_long_t usage;
>> +       atomic_long_t events[MISC_CG_EVENT_TYPES];
> 
> Since there is only one event type for now, my recommendation is to
> not use the array and just use a single atomic_long_t.
> 
>>
>> +static const char *const misc_event_name[] = {
>> +       "max"
>> +};
>> +
> 
> We will not need it if you remove the array in struct misc_res.

All right, thanks.

> Thanks
> Vipin
> 

  reply	other threads:[~2021-09-14  2:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-13  5:00 [PATCH v2 1/3] misc_cgroup: introduce misc.events and misc_events.local brookxu
2021-09-13  5:01 ` [PATCH v2 2/3] misc_cgroup: remove error log to avoid log flood brookxu
2021-09-13  5:01 ` [PATCH v2 3/3] docs/cgroup: add entry for misc.events and misc.events.local brookxu
2021-09-13  5:01   ` brookxu
2021-09-13 16:51 ` [PATCH v2 1/3] misc_cgroup: introduce misc.events and misc_events.local Vipin Sharma
2021-09-14  2:23   ` brookxu [this message]
2021-09-14 20:10     ` Vipin Sharma
2021-09-14 20:10       ` Vipin Sharma

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=b62597e9-72c4-563e-fdc7-3315569502f0@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.