lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 20 Oct 2010 11:24:31 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Cc:	Daisuke Nishimura <nishimura@....nes.nec.co.jp>,
	Greg Thelen <gthelen@...gle.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	containers@...ts.osdl.org, Andrea Righi <arighi@...eler.com>,
	Balbir Singh <balbir@...ux.vnet.ibm.com>,
	Minchan Kim <minchan.kim@...il.com>,
	Ciju Rajan K <ciju@...ux.vnet.ibm.com>,
	David Rientjes <rientjes@...gle.com>
Subject: Re: [PATCH v3 02/11] memcg: document cgroup dirty memory interfaces

On Wed, 20 Oct 2010 10:14:21 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com> wrote:

> On Wed, 20 Oct 2010 09:48:21 +0900
> Daisuke Nishimura <nishimura@....nes.nec.co.jp> wrote:
> 
> > On Wed, 20 Oct 2010 09:11:09 +0900
> > KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com> wrote:
> > 
> > > On Tue, 19 Oct 2010 14:00:58 -0700
> > > Greg Thelen <gthelen@...gle.com> 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.
> > 
> 
> I'd like to consider a patch.
> Please mention that "use_hierarchy=1 case depends on implemenation." for now.
> 

BTW, how about supporing dirty_limit_in_bytes when use_hierarchy=0 or leave it as
broken when use_hierarchy=1 ?
It seems we can only support dirty_ratio when hierarchy is used.

Thanks,
-Kame

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ