From: Serge Hallyn <serge.hallyn@ubuntu.com>
To: Tejun Heo <tj@kernel.org>
Cc: lizefan@huawei.com, containers@lists.linux-foundation.org,
linux-kernel@vger.kernel.org, mhocko@suse.cz, vgoyal@redhat.com,
cgroups@vger.kernel.org
Subject: Re: [PATCH 4/4] memcg: force use_hierarchy if sane_behavior
Date: Mon, 15 Apr 2013 00:29:24 -0500 [thread overview]
Message-ID: <20130415052923.GA28141@sergelap> (raw)
In-Reply-To: <20130415023935.GE3050@htj.dyndns.org>
Quoting Tejun Heo (tj@kernel.org):
> Hello, Serge.
>
> On Sun, Apr 14, 2013 at 08:13:36PM -0500, Serge Hallyn wrote:
> > If I do
> >
> > cd /sys/fs/cgroup/memory
> > mkdir b
> > cd b
> > echo 1 > memory.use_hierarchy
> > echo 5000 > memory.limit_in_bytes
> > cat memory.limit_in_bytes
> > 8192
> > mkdir c
> > cd c
> > cat memory.use_hierarchy
> > 1
> > cat memory.limit_in_bytes
> > 9223372036854775807
> > echo $$ > tasks
> > bash
> > <killed>
> >
> > So it seems the hierarchy is being enforced, but not reported in
> > child limit_in_bytes files.
>
> Hmm.... if I understand you correctly, it ain't bug. It's supposed to
> work that way. The parent has certain limits and the child doesn't.
> The child will operate within the paren't limits but in those limits
> it isn't restricted. We actually have a controller which does
> propagate configuration, the device security one, which I don't think
> is really optimal but it seems to be the easier way to implement
> hierarchical behavior for that controller.
>
> Anyways, if you think about the use cases, the current memcg way makes
> a lot more sense and is more flexible. e.g. You can express things
> like A + B shouldn't go above 1000 (whatever the unit is) but A and B
> in each can go upto 700 when there's room.
True, that makes sense, thanks.
This example would be great to have in Documentation/cgroups/memory.txt.
Perhaps as a new subsection 6.2?
-serge
next prev parent reply other threads:[~2013-04-15 5:29 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-12 23:10 [PATCHSET] cgroup, memcg: introduce sane_behavior mount option Tejun Heo
2013-04-12 23:10 ` [PATCH 1/4] cgroup: convert cgroupfs_root flag bits to masks and add CGRP_ prefix Tejun Heo
2013-04-15 0:56 ` Serge Hallyn
2013-04-12 23:10 ` [PATCH 2/4] move cgroupfs_root to include/linux/cgroup.h Tejun Heo
2013-04-15 1:02 ` Serge Hallyn
2013-04-12 23:10 ` [PATCH 3/4] cgroup: introduce sane_behavior mount option Tejun Heo
2013-04-15 1:05 ` Serge Hallyn
2013-04-15 2:49 ` Li Zefan
2013-04-15 2:54 ` Tejun Heo
2013-04-12 23:10 ` [PATCH 4/4] memcg: force use_hierarchy if sane_behavior Tejun Heo
2013-04-15 1:06 ` Serge Hallyn
2013-04-15 1:13 ` Serge Hallyn
2013-04-15 2:35 ` Michal Hocko
2013-04-15 2:39 ` Tejun Heo
2013-04-15 5:29 ` Serge Hallyn [this message]
2013-04-15 14:42 ` Michal Hocko
2013-04-15 15:29 ` Kamezawa Hiroyuki
2013-04-15 20:40 ` [PATCH v2 " Tejun Heo
2013-04-15 20:57 ` Michal Hocko
2013-04-15 2:50 ` [PATCHSET] cgroup, memcg: introduce sane_behavior mount option Li Zefan
2013-04-15 3:17 ` Tejun Heo
2013-04-15 14:46 ` Michal Hocko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130415052923.GA28141@sergelap \
--to=serge.hallyn@ubuntu.com \
--cc=cgroups@vger.kernel.org \
--cc=containers@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=mhocko@suse.cz \
--cc=tj@kernel.org \
--cc=vgoyal@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox