Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753293AbZLOBib (ORCPT ); Mon, 14 Dec 2009 20:38:31 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752287AbZLOBi3 (ORCPT ); Mon, 14 Dec 2009 20:38:29 -0500 Received: from fgwmail5.fujitsu.co.jp ([192.51.44.35]:53318 "EHLO fgwmail5.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752166AbZLOBi0 (ORCPT ); Mon, 14 Dec 2009 20:38:26 -0500 X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 Date: Tue, 15 Dec 2009 10:35:17 +0900 From: KAMEZAWA Hiroyuki To: "Kirill A. Shutemov" Cc: nishimura@mxp.nes.nec.co.jp, containers@lists.linux-foundation.org, linux-mm@kvack.org, Paul Menage , Li Zefan , Andrew Morton , Balbir Singh , Pavel Emelyanov , Dan Malek , Vladislav Buzov , linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC v2 3/4] memcg: rework usage of stats by soft limit Message-Id: <20091215103517.75645536.kamezawa.hiroyu@jp.fujitsu.com> In-Reply-To: References: <747ea0ec22b9348208c80f86f7a813728bf8e50a.1260571675.git.kirill@shutemov.name> <20091212125046.14df3134.d-nishimura@mtf.biglobe.ne.jp> <20091212233409.60da66fb.d-nishimura@mtf.biglobe.ne.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=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1817 Lines: 48 On Sat, 12 Dec 2009 21:46:08 +0200 "Kirill A. Shutemov" wrote: > On Sat, Dec 12, 2009 at 4:34 PM, Daisuke Nishimura > wrote: > > On Sat, 12 Dec 2009 15:06:52 +0200 > > "Kirill A. Shutemov" wrote: > > > >> On Sat, Dec 12, 2009 at 5:50 AM, Daisuke Nishimura > >> wrote: > >> > And IIUC, it's the same for your threshold feature, right ? > >> > I think it would be better: > >> > > >> > - discard this change. > >> > - in 4/4, rename mem_cgroup_soft_limit_check to mem_cgroup_event_check, > >> >  and instead of adding a new STAT counter, do like: > >> > > >> >        if (mem_cgroup_event_check(mem)) { > >> >                mem_cgroup_update_tree(mem, page); > >> >                mem_cgroup_threshold(mem); > >> >        } > >> > >> I think that mem_cgroup_update_tree() and mem_cgroup_threshold() should be > >> run with different frequency. How to share MEM_CGROUP_STAT_EVENTS > >> between soft limits and thresholds in this case? > >> > > hmm, both softlimit and your threshold count events at the same place(charge and uncharge). > > So, I think those events can be shared. > > Is there any reason they should run in different frequency ? > > SOFTLIMIT_EVENTS_THRESH is 1000. If use the same value for thresholds, > a threshold can > be exceed on 1000*nr_cpu_id pages. It's too many. I think, that 100 is > a reasonable value. > Hmm, then what amount of costs does this code add ? Do you have benchmark result ? Thanks, -Kame -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/