[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b62597e9-72c4-563e-fdc7-3315569502f0@gmail.com>
Date: Tue, 14 Sep 2021 10:23:13 +0800
From: brookxu <brookxu.cn@...il.com>
To: Vipin Sharma <vipinsh@...gle.com>, Tejun Heo <tj@...nel.org>
Cc: lizefan.x@...edance.com, hannes@...xchg.org, mkoutny@...e.com,
corbet@....net, linux-kernel@...r.kernel.org,
cgroups@...r.kernel.org, linux-doc@...r.kernel.org
Subject: Re: [PATCH v2 1/3] misc_cgroup: introduce misc.events and
misc_events.local
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@...il.com> wrote:
>>
>> From: Chunguang Xu <brookxu@...cent.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
>
Powered by blists - more mailing lists