From: brookxu <brookxu.cn@gmail.com>
To: "Vipin Sharma" <vipinsh@google.com>, "Michal Koutný" <mkoutny@suse.com>
Cc: tj@kernel.org, lizefan.x@bytedance.com, hannes@cmpxchg.org,
linux-kernel@vger.kernel.org, cgroups@vger.kernel.org
Subject: Re: [RFC PATCH 1/3] misc_cgroup: introduce misc.events and misc_events.local
Date: Fri, 10 Sep 2021 13:20:37 +0800 [thread overview]
Message-ID: <8259b666-f3a4-6788-880c-38d679414bcb@gmail.com> (raw)
In-Reply-To: <CAHVum0eGN=v1kLqHQg7HBESp8Kg4aGZFNd4XTpxfeyToXPmPVg@mail.gmail.com>
Vipin Sharma wrote on 2021/9/10 1:08 上午:
> On Thu, Sep 9, 2021 at 7:37 AM Michal Koutný <mkoutny@suse.com> wrote:
>>
>> Hello Chunguang.
>>
>> The new version looks like a good step generally.
>>
>> My main remark is that I wouldn't make a distinct v1 and v2 interface,
>> it's a new controller so I think the v2 could be exposed in both cases
>> (or in other words, don't create new v1-specific features).
>
> I agree with Michal. We can have the same interface for v1 otherwise
> there will not be any form of feedback in v1 for failures.
Yeah, this is more reasonable. But there is still one question, whether we
need to be consistent with other cgroup subsystems, events and events.local
under v1 should not support hierarchy?
>>
>> On Wed, Sep 08, 2021 at 01:24:34PM +0800, brookxu <brookxu.cn@gmail.com> wrote:
>>> +static int misc_events_show(struct seq_file *sf, void *v)
>>> +{
>>> + struct misc_cg *cg = css_misc(seq_css(sf));
>>> + unsigned long count, i;
>>> +
>>> + for (i = 0; i < MISC_CG_RES_TYPES; i++) {
>>> + count = atomic_long_read(&cg->events[i]);
>>> + if (READ_ONCE(misc_res_capacity[i]) || count)
>>> + seq_printf(sf, "%s %lu\n", misc_res_name[i], count);
>>
>> More future-proof key would be
>> seq_printf(sf, "%s.max %lu\n", misc_res_name[i], count);
>> or
>> seq_printf(sf, "max.%s %lu\n", misc_res_name[i], count);
>>
>> (Which one is a judgement call but I'd include the "name" of event type too.)
>>
> I am inclined more towards "%s.max", it looks nice to see the resource
> name before its corresponding events
I also think %s.max may be more intuitive.
next prev parent reply other threads:[~2021-09-10 5:21 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-08 5:24 brookxu
2021-09-08 5:24 ` [RFC PATCH 2/3] misc_cgroup: introduce misc.failcnt for V1 brookxu
2021-09-09 14:37 ` Michal Koutný
2021-09-08 5:24 ` [RFC PATCH 3/3] misc_cgroup: remove error log to avoid log flood brookxu
2021-09-09 14:37 ` Michal Koutný
2021-09-09 16:49 ` Vipin Sharma
2021-09-09 18:56 ` Michal Koutný
2021-09-10 5:30 ` brookxu
2021-09-10 9:23 ` Michal Koutný
2021-09-10 14:29 ` brookxu.cn
2021-09-10 15:36 ` Michal Koutný
2021-09-10 16:29 ` Tejun Heo
2021-09-10 17:16 ` Vipin Sharma
2021-09-10 17:19 ` Tejun Heo
2021-09-10 17:31 ` Vipin Sharma
2021-09-10 17:37 ` Tejun Heo
2021-09-09 14:37 ` [RFC PATCH 1/3] misc_cgroup: introduce misc.events and misc_events.local Michal Koutný
2021-09-09 17:08 ` Vipin Sharma
2021-09-10 5:20 ` brookxu [this message]
2021-09-10 10:33 ` Michal Koutný
2021-09-10 16:32 ` Tejun Heo
2021-09-09 16:56 ` Vipin Sharma
2021-09-10 5:21 ` brookxu
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=8259b666-f3a4-6788-880c-38d679414bcb@gmail.com \
--to=brookxu.cn@gmail.com \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®