linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Tejun Heo <tj@kernel.org>
Cc: linux-kernel@vger.kernel.org, Michal Hocko <mhocko@suse.cz>,
	Li Zefan <lizf@cn.fujitsu.com>,
	Glauber Costa <glommer@parallels.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Paul Turner <pjt@google.com>,
	Johannes Weiner <hannes@cmpxchg.org>, Thomas Graf <tgraf@suug.ch>,
	"Serge E. Hallyn" <serue@us.ibm.com>,
	Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
	Neil Horman <nhorman@tuxdriver.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Subject: Re: [PATCH RFC cgroup/for-3.7] cgroup: mark subsystems with broken hierarchy support and whine if cgroups are nested for them
Date: Tue, 11 Sep 2012 14:16:00 -0400	[thread overview]
Message-ID: <20120911181600.GK12039@redhat.com> (raw)
In-Reply-To: <20120911175515.GP7677@google.com>

On Tue, Sep 11, 2012 at 10:55:15AM -0700, Tejun Heo wrote:
> Hello, Vivek.
> 
> On Tue, Sep 11, 2012 at 01:35:25PM -0400, Vivek Goyal wrote:
> > It is kind of strange. First kernel allows creation of hiearchy for
> > non-hierarchical controllers and it also gives warning for user space to
> > not do that.
> > 
> > If creating hiearchy for flat controllers is wrong then kernel should
> > not allow it in first place and enforce it, instead of just giving a
> > warning to user space to not create the hierarchy.
> > 
> > Initially I had blocked the creation of hierarchy deeper than 1 level
> > but later had to remove it as people wanted libvirt to use blkio
> > controller and seemed to be fine with flat support. In fact there
> > were people who insisted on flat support as they thought that made
> > more sense.
> 
> Yes, it is an ugly situation and we'll have to drag ourselves out of
> this mess gradually.  I hope it hadn't happened like this but what
> happened already happened and I can't see a better way out.  If you
> can, please share.
> 
> > Sure. Just that CFQ code now has become really complicated and messy
> > (especially with that 3 service trees per group) so making it hierarchical
> > is significant amount of effort.
> 
> I think the wording for the warning wasn't entirely accurate.  The
> thing that we wanna warn about is that the hierarchy behavior isn't
> complete yet and it may change in the future.  If we can absolutely
> declare that cfq is and will stay broken in terms of hierarchy
> support, that could work too but I don't really think that's a good
> idea.  It's something we need to do one way or the other.
> 
> > And regarding change of behavior, we can always intoduce a .hierarchy
> > file like cgroup which needs to be explicitly set to make controller
> > truly hiearchical. That way behavior does not change in a subtle manner
> > in future kernel releases. (Not that I am a fan of hierarchy file, just
> > that it is cost we pay for not implementing hierarchical controller to
> > begin with).
> 
> I think that way of thinking is what led to this horrible mess in the
> first place.  More flexibility doesn't equal better.  We can't keep
> piling things on top.  I'd like to at least have an exit strategy.
> use_hierarchy drives us further away from where we wanna be.

Ok, so whole point of warning seems to be so that we can change the
behavior in future and say to user space they few kernel releases back we
had started printing a warning that creating hierarchy is wrong and 
move to a flat setup. So don't complain to us now.?

Are you planning to get rid of .user_hierarchy file from memory cgroup
too? If you are planning not to put such a file in blkio controller,
then it will make sense to remove it from mem_cgorup too.

.use_hierarchy was not set by default in memory controller and I think one
of the reasons was increased overhead of accounting in deep hierarchies.
Has that been sorted out?

The point I am trying to make is that deep hierarchies (5-6 levels) are
/going to be a reality and if accounting overhead is not manageable then
enabling hierarchy by default might not be a practical solution even
if you implement hierarchy support (like memory cgroup), and in that
case retaining .use_hierarchy will make sense.

IIUC, are you saying that now none of the controller will have flat
hiearchy support because there is no way to be able to create flat 
hierarchy. (Any new group is child of root group). So are we moving
towards a model where every controller is hierarhical and there is
no concept of flat hierarchy.

Thanks
Vivek

  reply	other threads:[~2012-09-11 18:17 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-10 22:31 [PATCH RFC cgroup/for-3.7] cgroup: mark subsystems with broken hierarchy support and whine if cgroups are nested for them Tejun Heo
2012-09-10 22:33 ` [PATCH REPOST " Tejun Heo
2012-09-11 10:04   ` Michal Hocko
2012-09-11 17:07     ` Tejun Heo
2012-09-12 15:47       ` Michal Hocko
2012-09-12 16:41         ` Tejun Heo
     [not found]     ` <5050568B.9090601@parallels.com>
2012-09-12 15:49       ` Michal Hocko
2012-09-12 17:11         ` Tejun Heo
2012-09-13 12:14           ` Michal Hocko
2012-09-13 17:18             ` Tejun Heo
2012-09-13 17:39               ` Michal Hocko
     [not found]                 ` <5052E87A.1050405@parallels.com>
2012-09-14 19:15                   ` Tejun Heo
     [not found]           ` <5051CB24.4010801@parallels.com>
2012-09-13 17:21             ` Tejun Heo
2012-09-11 12:38   ` Li Zefan
2012-09-11 17:08     ` Tejun Heo
2012-09-11 17:43       ` Tejun Heo
     [not found]         ` <505057D8.4010908@parallels.com>
2012-09-12 16:34           ` Tejun Heo
2012-09-13  6:48             ` Li Zefan
2012-09-11 18:23   ` [PATCH UPDATED " Tejun Heo
2012-09-11 20:50     ` Aristeu Rozanski
2012-09-11 20:51       ` Tejun Heo
2012-09-13 12:16   ` [PATCH REPOST " Daniel P. Berrange
2012-09-13 17:52     ` Tejun Heo
2012-09-11 14:51 ` [PATCH " Vivek Goyal
2012-09-11 14:54   ` Vivek Goyal
2012-09-11 17:16   ` Tejun Heo
2012-09-11 17:35     ` Vivek Goyal
2012-09-11 17:55       ` Tejun Heo
2012-09-11 18:16         ` Vivek Goyal [this message]
2012-09-11 18:22           ` Tejun Heo
2012-09-11 18:38             ` Vivek Goyal
     [not found]         ` <50505C39.1050600@parallels.com>
2012-09-12 17:09           ` Tejun Heo
2012-09-13 14:53             ` Block IO controller hierarchy suppport (Was: Re: [PATCH RFC cgroup/for-3.7] cgroup: mark subsystems with broken hierarchy support and whine if cgroups are nested for them) Vivek Goyal
2012-09-13 22:06               ` Tejun Heo
2012-09-14  2:53                 ` Vivek Goyal
     [not found]                   ` <5052E8DA.1000106@parallels.com>
2012-09-14 13:22                     ` Vivek Goyal
     [not found]             ` <5051CBAA.5040308@parallels.com>
2012-09-13 17:54               ` [PATCH RFC cgroup/for-3.7] cgroup: mark subsystems with broken hierarchy support and whine if cgroups are nested for them Tejun Heo
     [not found]                 ` <5052E931.8000007@parallels.com>
2012-09-14 18:56                   ` Tejun Heo
     [not found] ` <505055E5.90903@parallels.com>
2012-09-12 17:03   ` Tejun Heo
     [not found]     ` <5051C954.2080600@parallels.com>
2012-09-13 17:48       ` Tejun Heo
     [not found]         ` <5052E9BC.2020908@parallels.com>
2012-09-17  7:59           ` Daniel Wagner

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=20120911181600.GK12039@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=acme@ghostprotocols.net \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=glommer@parallels.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=mhocko@suse.cz \
    --cc=mingo@redhat.com \
    --cc=nhorman@tuxdriver.com \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=pjt@google.com \
    --cc=serue@us.ibm.com \
    --cc=tgraf@suug.ch \
    --cc=tj@kernel.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;
as well as URLs for NNTP newsgroup(s).