From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755970Ab0JTBIz (ORCPT ); Tue, 19 Oct 2010 21:08:55 -0400 Received: from TYO201.gate.nec.co.jp ([202.32.8.193]:41107 "EHLO tyo201.gate.nec.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753507Ab0JTBIy (ORCPT ); Tue, 19 Oct 2010 21:08:54 -0400 Date: Wed, 20 Oct 2010 09:48:21 +0900 From: Daisuke Nishimura To: KAMEZAWA Hiroyuki Cc: Greg Thelen , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, containers@lists.osdl.org, Andrea Righi , Balbir Singh , Minchan Kim , Ciju Rajan K , David Rientjes , Daisuke Nishimura Subject: Re: [PATCH v3 02/11] memcg: document cgroup dirty memory interfaces Message-Id: <20101020094821.75c70fe3.nishimura@mxp.nes.nec.co.jp> In-Reply-To: <20101020091109.ccd7b39a.kamezawa.hiroyu@jp.fujitsu.com> References: <1287448784-25684-1-git-send-email-gthelen@google.com> <1287448784-25684-3-git-send-email-gthelen@google.com> <20101019172744.45e0a8dc.nishimura@mxp.nes.nec.co.jp> <20101020091109.ccd7b39a.kamezawa.hiroyu@jp.fujitsu.com> Organization: NEC Soft, Ltd. X-Mailer: Sylpheed 3.0.3 (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 Wed, 20 Oct 2010 09:11:09 +0900 KAMEZAWA Hiroyuki wrote: > On Tue, 19 Oct 2010 14:00:58 -0700 > Greg Thelen wrote: > (snip) > > +When use_hierarchy=0, each cgroup has independent dirty memory usage and limits. > > + > > +When use_hierarchy=1, a parent cgroup increasing its dirty memory usage will > > +compare its total_dirty memory (which includes sum of all child cgroup dirty > > +memory) to its dirty limits. This keeps a parent from explicitly exceeding its > > +dirty limits. However, a child cgroup can increase its dirty usage without > > +considering the parent's dirty limits. Thus the parent's total_dirty can exceed > > +the parent's dirty limits as a child dirties pages. > > Hmm. in short, dirty_ratio in use_hierarchy=1 doesn't work as an user expects. > Is this a spec. or a current implementation ? > > I think as following. > - add a limitation as "At setting chidlren's dirty_ratio, it must be below parent's. > If it exceeds parent's dirty_ratio, EINVAL is returned." > > Could you modify setting memory.dirty_ratio code ? > Then, parent's dirty_ratio will never exceeds its own. (If I understand correctly.) > > "memory.dirty_limit_in_bytes" will be a bit more complecated, but I think you can. > I agree. At the first impression, this limitation seems a bit overkill for me, because we allow memory.limit_in_bytes of a child bigger than that of parent now. But considering more, the situation is different, because usage_in_bytes never exceeds limit_in_bytes. Thanks, Daisuke Nishimura.