From mboxrd@z Thu Jan 1 00:00:00 1970 From: KAMEZAWA Hiroyuki Subject: Re: [PATCH RFC v0 2/3] res_counter: implement thresholds Date: Fri, 27 Nov 2009 11:45:11 +0900 Message-ID: <20091127114511.bbb43d5a.kamezawa.hiroyu__34658.4528837868$1259290131$gmane$org@jp.fujitsu.com> References: <8524ba285f6dd59cda939c28da523f344cdab3da.1259255307.git.kirill@shutemov.name> <20091127092035.bbf2efdc.nishimura@mxp.nes.nec.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20091127092035.bbf2efdc.nishimura-YQH0OdQVrdy45+QrQBaojngSJqDPrsil@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Daisuke Nishimura Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, Paul Menage , Pavel Emelyanov , Andrew Morton , Balbir Singh List-Id: containers.vger.kernel.org On Fri, 27 Nov 2009 09:20:35 +0900 Daisuke Nishimura 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)? > 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 ? Filter by the number of event will be good for notifier behavior, for avoiding too much wake up, too. Thanks, -Kame