From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753812AbZK0CsF (ORCPT ); Thu, 26 Nov 2009 21:48:05 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753752AbZK0CsE (ORCPT ); Thu, 26 Nov 2009 21:48:04 -0500 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:38113 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753743AbZK0CsD (ORCPT ); Thu, 26 Nov 2009 21:48:03 -0500 X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 Date: Fri, 27 Nov 2009 11:45:11 +0900 From: KAMEZAWA Hiroyuki To: Daisuke Nishimura Cc: "Kirill A. Shutemov" , containers@lists.linux-foundation.org, linux-mm@kvack.org, Paul Menage , Li Zefan , Andrew Morton , Balbir Singh , Pavel Emelyanov , linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC v0 2/3] res_counter: implement thresholds Message-Id: <20091127114511.bbb43d5a.kamezawa.hiroyu@jp.fujitsu.com> In-Reply-To: <20091127092035.bbf2efdc.nishimura@mxp.nes.nec.co.jp> References: <8524ba285f6dd59cda939c28da523f344cdab3da.1259255307.git.kirill@shutemov.name> <20091127092035.bbf2efdc.nishimura@mxp.nes.nec.co.jp> Organization: FUJITSU Co. LTD. X-Mailer: Sylpheed 2.5.0 (GTK+ 2.10.14; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail190.messagelabs.com (mail190.messagelabs.com [216.82.249.51]) by kanga.kvack.org (Postfix) with SMTP id D63976B004D for ; Thu, 26 Nov 2009 21:48:11 -0500 (EST) Received: from m4.gw.fujitsu.co.jp ([10.0.50.74]) by fgwmail6.fujitsu.co.jp (Fujitsu Gateway) with ESMTP id nAR2m9ap028652 for (envelope-from kamezawa.hiroyu@jp.fujitsu.com); Fri, 27 Nov 2009 11:48:09 +0900 Received: from smail (m4 [127.0.0.1]) by outgoing.m4.gw.fujitsu.co.jp (Postfix) with ESMTP id 7D92445DE7F for ; Fri, 27 Nov 2009 11:48:08 +0900 (JST) Received: from s4.gw.fujitsu.co.jp (s4.gw.fujitsu.co.jp [10.0.50.94]) by m4.gw.fujitsu.co.jp (Postfix) with ESMTP id 4898645DE4D for ; Fri, 27 Nov 2009 11:48:08 +0900 (JST) Received: from s4.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s4.gw.fujitsu.co.jp (Postfix) with ESMTP id 1A941E1800C for ; Fri, 27 Nov 2009 11:48:08 +0900 (JST) Received: from m107.s.css.fujitsu.com (m107.s.css.fujitsu.com [10.249.87.107]) by s4.gw.fujitsu.co.jp (Postfix) with ESMTP id A7A1BE18007 for ; Fri, 27 Nov 2009 11:48:07 +0900 (JST) Date: Fri, 27 Nov 2009 11:45:11 +0900 From: KAMEZAWA Hiroyuki Subject: Re: [PATCH RFC v0 2/3] res_counter: implement thresholds Message-Id: <20091127114511.bbb43d5a.kamezawa.hiroyu@jp.fujitsu.com> In-Reply-To: <20091127092035.bbf2efdc.nishimura@mxp.nes.nec.co.jp> 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 Sender: owner-linux-mm@kvack.org To: Daisuke Nishimura Cc: "Kirill A. Shutemov" , containers@lists.linux-foundation.org, linux-mm@kvack.org, Paul Menage , Li Zefan , Andrew Morton , Balbir Singh , Pavel Emelyanov , linux-kernel@vger.kernel.org List-ID: 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 -- 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: email@kvack.org