From: Vivek Goyal <vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Neil Horman <nhorman-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>,
"Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>,
containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
Michal Hocko <mhocko-AlSwsSmVLrQ@public.gmane.org>,
Paul Mackerras <paulus-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>,
"Aneesh Kumar K.V"
<aneesh.kumar-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>,
Arnaldo Carvalho de Melo
<acme-f8uhVLnGfZaxAyOMLChx1axOck334EZe@public.gmane.org>,
Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>,
Thomas Graf <tgraf-G/eBtMaohhA@public.gmane.org>,
cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Paul Turner <pjt-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
Ingo Molnar <mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH v4 cgroup/for-3.7] cgroup: mark subsystems with broken hierarchy support and whine if cgroups are nested for them
Date: Thu, 13 Sep 2012 15:41:11 -0400 [thread overview]
Message-ID: <20120913194111.GM4396@redhat.com> (raw)
In-Reply-To: <20120913192058.GH7677-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
On Thu, Sep 13, 2012 at 12:20:58PM -0700, Tejun Heo wrote:
[..]
> +
> + if (ss->broken_hierarchy && !ss->warned_broken_hierarchy &&
> + parent->parent) {
> + pr_warning("cgroup: %s (%d) created nested cgroup for controller \"%s\" which has incomplete hierarchy support. Nested cgroups may change behavior in the future.\n",
> + current->comm, current->pid, ss->name);
> + if (!strcmp(ss->name, "memory"))
> + pr_warning("cgroup: \"memory\" requires setting use_hierarchy to 1 on the root.\n");
> + ss->warned_broken_hierarchy = true;
> + }
Hi Tejun,
Had one more question. So this warning pops up if parent->parent is set.
So first level of cgroup creation is allowed but not the second level
one?
I think for blkio controller, first level of creation itself is wrong if
hierarchy is not supported.
root
/ | \
T1 T2 G1
So T1 and T2 are tasks and G1 is the created cgroup. Now if we are
expecting hierarchical controller then like cpu controller, T1, T2 and
G1 should be considered at same level and disk bandwidth should be
divided equally between T1, T2 and G1.
But currently blkio controller looks at them as follows.
pivot
/ \
root G1
/ \
T1 T2
and divides bandwidth between root and G1 equally (if weights are equal).
Now if you don't warn about first level creation and later change to default
hierarchical controller, anyway you will change the behavior underneath
(even if user space creates only one level of cgroup).
Point being, cgroup fs does not allow us to create flat hierarchy. So
warning about second level creation and beyond does not help much and
behavior underneath will change anyway(even for first level of creation).
Thanks
Vivek
next prev parent reply other threads:[~2012-09-13 19:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-13 18:34 [PATCH cgroup/for-3.7] cgroup: mark subsystems with broken hierarchy support and whine if cgroups are nested for them Tejun Heo
[not found] ` <20120913183402.GG7677-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-09-13 18:46 ` Michal Hocko
2012-09-13 19:20 ` [PATCH v4 " Tejun Heo
[not found] ` <20120913192058.GH7677-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-09-13 19:27 ` Michal Hocko
2012-09-13 19:41 ` Vivek Goyal [this message]
[not found] ` <20120913194111.GM4396-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-09-13 20:03 ` Tejun Heo
[not found] ` <20120913200354.GN7677-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-09-13 20:17 ` Vivek Goyal
2012-09-14 9:14 ` Glauber Costa
[not found] ` <5052F58E.4050808-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2012-09-14 9:17 ` Glauber Costa
[not found] ` <5052F61A.3040602-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2012-09-14 21:06 ` Tejun Heo
2012-09-14 4:55 ` Serge Hallyn
2012-09-14 7:48 ` Li Zefan
2012-09-14 9:11 ` Glauber Costa
2012-09-14 19:06 ` Tejun Heo
[not found] ` <20120914190608.GM17747-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-09-18 15:04 ` Michal Hocko
[not found] ` <20120918150404.GC19840-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2012-09-18 16:27 ` Tejun Heo
[not found] ` <CAOS58YPjEE-+Kak_XidAd5qT84pZKt_z=4_MXadHYvzP+yZ5+Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-09-18 16:33 ` 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=20120913194111.GM4396@redhat.com \
--to=vgoyal-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=acme-f8uhVLnGfZaxAyOMLChx1axOck334EZe@public.gmane.org \
--cc=aneesh.kumar-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org \
--cc=mhocko-AlSwsSmVLrQ@public.gmane.org \
--cc=mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=nhorman-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org \
--cc=paulus-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org \
--cc=pjt-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
--cc=tgraf-G/eBtMaohhA@public.gmane.org \
--cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
/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