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 16:17:49 -0400 [thread overview]
Message-ID: <20120913201748.GN4396@redhat.com> (raw)
In-Reply-To: <20120913200354.GN7677-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
On Thu, Sep 13, 2012 at 01:03:54PM -0700, Tejun Heo wrote:
> Hello, Vivek.
>
> On Thu, Sep 13, 2012 at 03:41:11PM -0400, Vivek Goyal wrote:
> > 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).
>
> Yeah, how to handle tasks and groups under the same cgroup is a
> difficult question. I don't think what blkcg does now is necessarily
> wrong and am not particularly fond of the idea of dealing tasks and
> groups as equals. It isn't clear how resource should be distributed
> across them - we don't have per-task knobs.
IIUC cpu controller tied together the notion of task priority and
cgroup weight. We could do something similar where we map the task
io priority to some weight and then divide bandwidth according to
that. That give us some control on tasks.
In the past we had this discussion and consensus seemed to be go
the cpu controller way where task and groups are treated at same
level when it comes to bandwidth division. One can always move all
the tasks to one of the children groups if this behavior is not
desired. The only problem is that kernel does not seem to offer
any fool proof way of moving existing process to a cgroup (making
sure none of the threads escaped the movement). Possibly freezer
controller could help here but I am not sure how it would freeze
threads in root cgroup which might require to be moved out to a
children group.
>
> I think this is a problem only for controllers which implement
> proportional control - cpu and blkio, am I right?
I think this might become a problem with throttling too if somebody was
throttling root group. Throttling root group is not recommended so that
might not be a big issue. (Though there is nothing in the code which
prevents it).
So you are right. Looks like cpu and block proportional control have this
issue. Memory controller might have handled it already using .use_hiearchy
i am assuming.
Thanks
Vivek
next prev parent reply other threads:[~2012-09-13 20:17 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
[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 [this message]
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=20120913201748.GN4396@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