From: Balbir Singh <bsingharora@gmail.com>
To: Tejun Heo <tj@kernel.org>
Cc: lizefan@huawei.com, Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@suse.cz>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
"cgroups@vger.kernel.org" <cgroups@vger.kernel.org>,
linux-mm <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/5] cgroup, memcg: move cgroup_event implementation to memcg
Date: Tue, 6 Aug 2013 21:33:01 +0530 [thread overview]
Message-ID: <CAKTCnzm+wXebh1SAvRq0MkqAWtLvTyhsafa7-U6B84P1zj9bRg@mail.gmail.com> (raw)
In-Reply-To: <20130806140904.GA9814@mtj.dyndns.org>
On Tue, Aug 6, 2013 at 7:39 PM, Tejun Heo <tj@kernel.org> wrote:
> Hello, Balbir.
>
> On Tue, Aug 06, 2013 at 08:56:34AM +0530, Balbir Singh wrote:
>> [off-topic] Has the unified hierarchy been agreed upon? I did not
>> follow that thread
>
> I consider it agreed upon enough. There of course are objections but
> I feel fairly comfortable with the amount of existing consensus and
> considering the current state of cgroup in general, especially the API
> leaks, I don't think we have many other choices. The devil is always
> in the details but unless we meet a major technical barrier, I'm
> pretty sure it's happening.
>
I guess we'll need to see what the details look like :)
>> > events at fixed points, or if that's too restrictive, configureable
>> > cadence or single set of configureable points should be enough.
>>
>> Nit-pick: typo on the spelling of configurable
>
> Will update.
>
>> Tejun, I think the framework was designed to be flexible. Do you see
>> cgroup subsystems never using this?
>
> I can't be a hundred percent sure that we won't need events which are
> configureable per-listener but it's highly unlikely given that we're
> moving onto single agent model and the nature of event delivery -
> spurious events are unlikely to be noticeable unless the frequency is
> very high. In general, as anything, aiming for extremes isn't a
> healthy design practice. Maximum flexibility sounds good in isolation
> but nothing is free and it entails unneeded complexity both in
> implementation and usage. Note that even for memcg, both oom and
> vmpressure don't benefit in any way from all the added complexity at
> all. The only other place that I can see event being useful at the
> moment is freezer state change notification and that also would only
> require unconditional file modified notification.
>
Hmm.. I think it would be interesting to set thresholds on other
resources instead of pure monitoring. One might want to set thresholds
for CPUACCT usage for example. Freezer is another example like you
mentioned.
>> > +static int cgroup_write_event_control(struct cgroup_subsys_state *css,
>> > + struct cftype *cft, const char *buffer)
>> > +{
>> > + struct cgroup *cgrp = css->cgroup;
>> > + struct cgroup_event *event;
>> > + struct cgroup *cgrp_cfile;
>> > + unsigned int efd, cfd;
>> > + struct file *efile;
>> > + struct file *cfile;
>> > + char *endp;
>> > + int ret;
>> > +
>>
>> Can we assert that buffer is NOT NULL here?
>
> The patch moves the code as-is as things become difficult to review
> otherwise. After the patchset, it belongs to memcg, please feel free
> to modify as memcg people see fit.
OK, Thanks
Balbir Singh
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2013-08-06 16:03 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-04 16:07 [PATCHSET cgroup/for-3.12] cgroup: make cgroup_event specific " Tejun Heo
2013-08-04 16:07 ` [PATCH 1/5] cgroup: implement CFTYPE_NO_PREFIX Tejun Heo
2013-08-04 16:07 ` [PATCH 2/5] cgroup: export __cgroup_from_dentry() and __cgroup_dput() Tejun Heo
2013-08-05 2:58 ` Li Zefan
2013-08-05 15:40 ` Tejun Heo
2013-08-05 17:08 ` [PATCH v2 2/5] cgroup: make __cgroup_from_dentry() and __cgroup_dput() global Tejun Heo
2013-08-04 16:07 ` [PATCH 3/5] cgroup, memcg: move cgroup_event implementation to memcg Tejun Heo
2013-08-05 3:14 ` Li Zefan
2013-08-05 17:09 ` [PATCH v2 " Tejun Heo
2013-08-06 2:02 ` Li Zefan
2013-08-06 2:21 ` Li Zefan
2013-08-06 3:26 ` [PATCH " Balbir Singh
2013-08-06 14:09 ` Tejun Heo
2013-08-06 16:03 ` Balbir Singh [this message]
2013-08-04 16:07 ` [PATCH 4/5] cgroup, memcg: move cgroup->event_list[_lock] and event callbacks into memcg Tejun Heo
2013-08-04 16:07 ` [PATCH 5/5] memcg: rename cgroup_event to mem_cgroup_event Tejun Heo
2013-08-05 3:26 ` Li Zefan
2013-08-05 17:10 ` [PATCH v2 " Tejun Heo
2013-08-05 16:01 ` [PATCHSET cgroup/for-3.12] cgroup: make cgroup_event specific to memcg Michal Hocko
2013-08-05 16:29 ` Tejun Heo
2013-08-05 19:16 ` Michal Hocko
2013-08-05 19:44 ` Tejun Heo
2013-08-06 15:58 ` Michal Hocko
2013-08-06 16:15 ` Tejun Heo
2013-08-07 12:18 ` Michal Hocko
2013-08-07 12:43 ` Tejun Heo
2013-08-07 13:26 ` Michal Hocko
2013-08-07 13:36 ` Tejun Heo
2013-08-08 2:53 ` Li Zefan
2013-08-09 1:00 ` Tejun Heo
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=CAKTCnzm+wXebh1SAvRq0MkqAWtLvTyhsafa7-U6B84P1zj9bRg@mail.gmail.com \
--to=bsingharora@gmail.com \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lizefan@huawei.com \
--cc=mhocko@suse.cz \
--cc=tj@kernel.org \
/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