From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Balbir Singh <balbir@linux.vnet.ibm.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: containers@lists.linux-foundation.org, linux-mm@kvack.org,
Paul Menage <menage@google.com>, Li Zefan <lizf@cn.fujitsu.com>,
Andrew Morton <akpm@linux-foundation.org>,
Pavel Emelyanov <xemul@openvz.org>,
linux-kernel@vger.kernel.org, Dan Malek <dan@embeddedalley.com>,
Vladislav Buzov <vbuzov@embeddedalley.com>
Subject: Re: [PATCH RFC v0 2/3] res_counter: implement thresholds
Date: Fri, 27 Nov 2009 09:08:19 +0200 [thread overview]
Message-ID: <cc557aab0911262308h452e836fo94c11c2d051e98a0@mail.gmail.com> (raw)
In-Reply-To: <661de9470911261908i4bb51e91v649025e6c75bd91b@mail.gmail.com>
On Fri, Nov 27, 2009 at 5:08 AM, Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
> On Fri, Nov 27, 2009 at 8:15 AM, KAMEZAWA Hiroyuki
> <kamezawa.hiroyu@jp.fujitsu.com> wrote:
>> On Fri, 27 Nov 2009 09:20:35 +0900
>> Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> wrote:
>>
>>> Hi.
>>> >
>>> > @@ -73,6 +76,7 @@ void res_counter_uncharge_locked(struct res_counter *counter, unsigned long val)
>>> > val = counter->usage;
>>> >
>>> > counter->usage -= val;
>>> > + res_counter_threshold_notify_locked(counter);
>>> > }
>>> >
>>> hmm.. this adds new checks to hot-path of process life cycle.
>>>
>>> Do you have any number on performance impact of these patches(w/o setting any threshold)?
No, I don't. I did only functional testing on this stage.
>>> IMHO, it might be small enough to be ignored because KAMEZAWA-san's coalesce charge/uncharge
>>> patches have decreased charge/uncharge for res_counter itself, but I want to know just to make sure.
>>>
>> Another concern is to support root cgroup, you need another notifier hook in
>> memcg because root cgroup doesn't use res_counter now.
>>
>> Can't this be implemented in a way like softlimit check ?
I'll investigate it.
>> Filter by the number of event will be good for notifier behavior, for avoiding
>> too much wake up, too.
Good idea, thanks.
> I guess the semantics would vary then, they would become activity
> semantics. I think we should avoid threshold notification for root,
> since we have no limits in root anymore.
Threshold notifications for root cgroup is really needed on embedded
systems to avid OOM-killer.
>
> BTW, Kirill, I've been meaning to write this layer on top of
> cgroupstats, is there anything that prevents us from using that today?
I'll investigate it.
> CC'ing Dan Malek and Vladslav Buzov who worked on similar patches
> earlier.
>
> 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:[~2009-11-27 7:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-26 17:11 [PATCH RFC v0 0/3] cgroup notifications API and memory thresholds Kirill A. Shutemov
2009-11-26 17:11 ` [PATCH RFC v0 1/3] cgroup: implement eventfd-based generic API for notifications Kirill A. Shutemov
2009-11-26 17:11 ` [PATCH RFC v0 2/3] res_counter: implement thresholds Kirill A. Shutemov
2009-11-26 17:11 ` [PATCH RFC v0 3/3] memcg: implement memory thresholds Kirill A. Shutemov
2009-11-27 0:20 ` [PATCH RFC v0 2/3] res_counter: implement thresholds Daisuke Nishimura
2009-11-27 2:45 ` KAMEZAWA Hiroyuki
2009-11-27 3:08 ` Balbir Singh
2009-11-27 7:08 ` Kirill A. Shutemov [this message]
[not found] ` <cover.1259321503.git.kirill@shutemov.name>
2009-11-27 11:55 ` [PATCH RFC v1 1/3] cgroup: implement eventfd-based generic API for notifications Kirill A. Shutemov
2009-11-27 11:55 ` [PATCH RFC v1 2/3] res_counter: implement thresholds Kirill A. Shutemov
2009-11-27 11:55 ` [PATCH RFC v1 3/3] memcg: implement memory thresholds Kirill A. Shutemov
-- strict thread matches above, loose matches on Subject: below --
2009-11-26 16:27 [PATCH RFC v0 0/3] cgroup notifications API and " Kirill A. Shutemov
2009-11-26 16:27 ` [PATCH RFC v0 1/3] cgroup: implement eventfd-based generic API for notifications Kirill A. Shutemov
2009-11-26 16:27 ` [PATCH RFC v0 2/3] res_counter: implement thresholds Kirill A. Shutemov
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=cc557aab0911262308h452e836fo94c11c2d051e98a0@mail.gmail.com \
--to=kirill@shutemov.name \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=containers@lists.linux-foundation.org \
--cc=dan@embeddedalley.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lizf@cn.fujitsu.com \
--cc=menage@google.com \
--cc=nishimura@mxp.nes.nec.co.jp \
--cc=vbuzov@embeddedalley.com \
--cc=xemul@openvz.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