All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: Glauber Costa <glommer@parallels.com>,
	cgroups@vger.kernel.org, linux-mm@kvack.org,
	kamezawa.hiroyu@jp.fujitsu.com, Michal Hocko <mhocko@suse.cz>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 2/2] memcg: first step towards hierarchical controller
Date: Tue, 26 Jun 2012 14:19:07 -0700	[thread overview]
Message-ID: <20120626211907.GX3869@google.com> (raw)
In-Reply-To: <20120626205924.GH27816@cmpxchg.org>

Hello, Johannes.

On Tue, Jun 26, 2012 at 10:59:24PM +0200, Johannes Weiner wrote:
> > How do we know that?  At least from what I see from blkcg usage,
> > people do crazy stuff when given crazy interface and we've been
> > providing completely crazy interface for years.  We cannot switch that
> > implicitly - the changed default behavior is drastically different and
> > even could be difficult to chase down.  Transitions towards good
> > behavior are good but they have to be explicit.
> 
> I can't really argue against this because this can't be anything but a
> handwaving contest.  We simply have no data.

The problem is that we can't know for sure until we make it explode
and, once we make it explode, well, it has exploded.

> Backward compatibility is a really good idea but I think it depends on
> the situation:
> 
>   I don't expect such a configuration to happen by accident because
>   this behaviour is against fundamental expectations users have toward
>   a filesystem, which is the hierarchical nature of nested entities.
> 
>   I also don't expect it to happen intentionnaly, simply because there
>   is nothing to gain from a more complicated nested setup.

I agree it's a feature which no sane person should be using but if you
look at the cgroup interface as whole, sadly, sanity is fairly scarce.
Nothing prevents one from mounting cpu and mem on the same hierarchy
expecting hierarchical control for cpus while using flat enforcement
on mem.  That was the default behavior after all.

>   And because there is nothing to gain, it is in addition really
>   trivial to fix the insane setups by simply undoing the nesting,
>   there is no downside for them.

I have to disagree with that.  Deployment sometimes can be very
painful.  In some cases, even flipping single parameter in sysfs
depending on kernel version takes considerable effort.  The behavior
has been the contract that we offered userland for quite some time
now.  We shouldn't be changing that underneath them without any clear
way for them to notice it.

> The only point where I agree with you is that it may indeed be
> non-obvious to detect in case you were relying on the filesystem
> hierarchy not being reflected in the controller hierarchy.  But even
> that depends on the usecase, whether it's a subtle performance
> regression or a total failure to execute a previously supported
> workload, which would be pretty damn obvious.

And imagine that happening in serveral thousand machine cluster with
fairly complicated cgroup setup and kernel update rolling out for
subset of machine types.  I would be screaming bloody murder.

> > > I would hate if people had to jump through hoops to get the only
> > > behaviour we want to end up supporting and to not get yelled at, it
> > > sends all the wrong signals.
> > 
> > It is inconvenient but that's the price that we have to pay for having
> > been stupid.  Kernel flipping behavior implicitly is far worse than
> > any such inconvenience.
> 
> That's a matter of taste.  It's not inconvenient for us, but for every
> normal person trying to use the feature in a sane way, just to support
> hypothetical crazy people when there is a really trivial solution for
> the crazy people's problem.

To me, this doesn't seem to be a matter of taste.  This is crossing
the line.  Note that the said inconvenience is likely to be felt only
by distros or admins and what should be done to remedy the situation
will be obvious.  I agree it isn't ideal but such is life, I suppose.

> > The kernel should nudge mainline users towards new behavior while
> > providing distros / admins a way to move to the new behavior.  The
> > kernel itself can't flip it like that.
> 
> I thought it was the kernel's job to provide sensible defaults and the
> distro's job to ease transitions...

Yeah, sure, and we failed horribly at providing sensible default here.
The right thing to do now is to gradually move towards the better
default.

> > Ah... yeah, flat hierarchy probably is the wrong way to describe it.
> > I don't know.  Superficial hierarchy?
> 
> Not sure there really is an appropriate two-word name for this
> artifact.  How about, pardon my German,
> Cgroupfilesystemcontrollerhierarchysemanticsdiscrepancy?

I'd like more Scheisse in there please.

Thanks.

-- 
tejun

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
Cc: Glauber Costa <glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>,
	cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org,
	kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org,
	Michal Hocko <mhocko-AlSwsSmVLrQ@public.gmane.org>,
	Andrew Morton
	<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
Subject: Re: [PATCH 2/2] memcg: first step towards hierarchical controller
Date: Tue, 26 Jun 2012 14:19:07 -0700	[thread overview]
Message-ID: <20120626211907.GX3869@google.com> (raw)
In-Reply-To: <20120626205924.GH27816-druUgvl0LCNAfugRpC6u6w@public.gmane.org>

Hello, Johannes.

On Tue, Jun 26, 2012 at 10:59:24PM +0200, Johannes Weiner wrote:
> > How do we know that?  At least from what I see from blkcg usage,
> > people do crazy stuff when given crazy interface and we've been
> > providing completely crazy interface for years.  We cannot switch that
> > implicitly - the changed default behavior is drastically different and
> > even could be difficult to chase down.  Transitions towards good
> > behavior are good but they have to be explicit.
> 
> I can't really argue against this because this can't be anything but a
> handwaving contest.  We simply have no data.

The problem is that we can't know for sure until we make it explode
and, once we make it explode, well, it has exploded.

> Backward compatibility is a really good idea but I think it depends on
> the situation:
> 
>   I don't expect such a configuration to happen by accident because
>   this behaviour is against fundamental expectations users have toward
>   a filesystem, which is the hierarchical nature of nested entities.
> 
>   I also don't expect it to happen intentionnaly, simply because there
>   is nothing to gain from a more complicated nested setup.

I agree it's a feature which no sane person should be using but if you
look at the cgroup interface as whole, sadly, sanity is fairly scarce.
Nothing prevents one from mounting cpu and mem on the same hierarchy
expecting hierarchical control for cpus while using flat enforcement
on mem.  That was the default behavior after all.

>   And because there is nothing to gain, it is in addition really
>   trivial to fix the insane setups by simply undoing the nesting,
>   there is no downside for them.

I have to disagree with that.  Deployment sometimes can be very
painful.  In some cases, even flipping single parameter in sysfs
depending on kernel version takes considerable effort.  The behavior
has been the contract that we offered userland for quite some time
now.  We shouldn't be changing that underneath them without any clear
way for them to notice it.

> The only point where I agree with you is that it may indeed be
> non-obvious to detect in case you were relying on the filesystem
> hierarchy not being reflected in the controller hierarchy.  But even
> that depends on the usecase, whether it's a subtle performance
> regression or a total failure to execute a previously supported
> workload, which would be pretty damn obvious.

And imagine that happening in serveral thousand machine cluster with
fairly complicated cgroup setup and kernel update rolling out for
subset of machine types.  I would be screaming bloody murder.

> > > I would hate if people had to jump through hoops to get the only
> > > behaviour we want to end up supporting and to not get yelled at, it
> > > sends all the wrong signals.
> > 
> > It is inconvenient but that's the price that we have to pay for having
> > been stupid.  Kernel flipping behavior implicitly is far worse than
> > any such inconvenience.
> 
> That's a matter of taste.  It's not inconvenient for us, but for every
> normal person trying to use the feature in a sane way, just to support
> hypothetical crazy people when there is a really trivial solution for
> the crazy people's problem.

To me, this doesn't seem to be a matter of taste.  This is crossing
the line.  Note that the said inconvenience is likely to be felt only
by distros or admins and what should be done to remedy the situation
will be obvious.  I agree it isn't ideal but such is life, I suppose.

> > The kernel should nudge mainline users towards new behavior while
> > providing distros / admins a way to move to the new behavior.  The
> > kernel itself can't flip it like that.
> 
> I thought it was the kernel's job to provide sensible defaults and the
> distro's job to ease transitions...

Yeah, sure, and we failed horribly at providing sensible default here.
The right thing to do now is to gradually move towards the better
default.

> > Ah... yeah, flat hierarchy probably is the wrong way to describe it.
> > I don't know.  Superficial hierarchy?
> 
> Not sure there really is an appropriate two-word name for this
> artifact.  How about, pardon my German,
> Cgroupfilesystemcontrollerhierarchysemanticsdiscrepancy?

I'd like more Scheifle in there please.

Thanks.

-- 
tejun

  reply	other threads:[~2012-06-26 21:19 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-26 15:47 [PATCH 0/2] fix and deprecate use_hierarchy file Glauber Costa
2012-06-26 15:47 ` [PATCH 1/2] fix bad behavior in " Glauber Costa
2012-06-26 15:47   ` Glauber Costa
2012-06-26 15:52   ` Michal Hocko
2012-06-26 15:52     ` Michal Hocko
2012-06-26 15:54   ` Johannes Weiner
2012-06-26 15:54     ` Johannes Weiner
2012-06-26 22:25   ` Andrew Morton
2012-06-26 22:25     ` Andrew Morton
2012-06-26 22:30     ` Tejun Heo
2012-06-26 15:47 ` [PATCH 2/2] memcg: first step towards hierarchical controller Glauber Costa
2012-06-26 15:47   ` Glauber Costa
2012-06-26 16:15   ` Michal Hocko
2012-06-26 16:15     ` Michal Hocko
2012-06-26 16:37     ` Glauber Costa
2012-06-26 16:37       ` Glauber Costa
2012-06-26 17:54       ` Michal Hocko
2012-06-26 17:54         ` Michal Hocko
2012-06-26 18:04   ` Tejun Heo
2012-06-26 18:04     ` Tejun Heo
2012-06-26 18:55     ` Johannes Weiner
2012-06-26 19:14       ` Tejun Heo
2012-06-26 19:14         ` Tejun Heo
2012-06-26 20:59         ` Johannes Weiner
2012-06-26 20:59           ` Johannes Weiner
2012-06-26 21:19           ` Tejun Heo [this message]
2012-06-26 21:19             ` Tejun Heo
2012-06-27  8:57             ` Glauber Costa
2012-06-27 17:07               ` Tejun Heo
2012-06-26 22:08     ` Michal Hocko
2012-06-26 22:08       ` Michal Hocko
2012-06-26 22:14       ` Tejun Heo
2012-06-26 22:14         ` Tejun Heo
2012-06-26 22:17         ` Tejun Heo
2012-06-27  8:52         ` Glauber Costa
2012-06-27  8:52           ` Glauber Costa
2012-06-27 16:58           ` Tejun Heo
2012-06-27 16:58             ` Tejun Heo
2012-06-27 12:51         ` Michal Hocko
2012-06-27 12:51           ` Michal Hocko
2012-06-27 12:49           ` Glauber Costa
2012-06-27 12:49             ` Glauber Costa
2012-06-27 17:33           ` Tejun Heo
2012-06-28  8:46             ` Kamezawa Hiroyuki
2012-06-28  8:46               ` Kamezawa Hiroyuki
2012-06-28  9:12               ` Glauber Costa
2012-06-28  9:12                 ` Glauber Costa

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=20120626211907.GX3869@google.com \
    --to=tj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=cgroups@vger.kernel.org \
    --cc=glommer@parallels.com \
    --cc=hannes@cmpxchg.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.cz \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.