linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Michel Lespinasse <walken@google.com>
Cc: Michal Hocko <mhocko@suse.cz>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Balbir Singh <bsingharora@gmail.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	cgroups@vger.kernel.org, linux-mm@kvack.org,
	Hugh Dickins <hughd@google.com>, Ying Han <yinghan@google.com>,
	Glauber Costa <glommer@parallels.com>,
	Greg Thelen <gthelen@google.com>
Subject: Re: memcg: softlimit on internal nodes
Date: Mon, 22 Apr 2013 07:48:26 -0700	[thread overview]
Message-ID: <20130422144826.GA12543@htj.dyndns.org> (raw)
In-Reply-To: <CANN689F7X1X4i1M=nteGan0POdVbBMu0xviuWN70f_BTv==3eA@mail.gmail.com>

Hello, again.

On Mon, Apr 22, 2013 at 12:14:53AM -0700, Michel Lespinasse wrote:
> > I think I stayed until near the end of the hierarchy discussion and
> > yeap I heard you saying that.
> 
> All right. Too bad you had to leave - I think this is a discussion we
> really need to have, so it would have been the perfect occasion.

Eh well, it would have been better if I stayed but I think it served
its purpose.  Conferences are great for raising awareness.  I usually
find actual follow-up discussions done better in mailing lists.

> > Cgroup doesn't and will not support delegation of subtrees to
> > different security domains.  Please refer to the following thread.
> >
> >   http://thread.gmane.org/gmane.linux.kernel.cgroups/6638
> 
> Ah, good. This is news to me. To be clear, I don't care much for the
> delegation scenario myself, but it's always been mentioned as the
> reason I couldn't get what I want when we've talked about hierarchical
> soft limit behavior in the past. If the decision not to have subtree
> delegation sticks, I am perfectly happy with your proposal.

Oh, it's sticking. :)

> > And I don't even get the delegation argument.  Isn't that already
> > covered by hardlimit?  Sure, reclaimer won't look at it but if you
> > don't trust a cgroup it of course will be put under certain hardlimit
> > from parent and smacked when it misbehaves.  Hardlimit of course
> > should have priority over allocation guarantee and the system wouldn't
> > be in jeopardy due to a delegated cgroup misbehaving.  If each knob is
> > given a clear meaning, these things should come naturally.  You just
> > need a sane pecking order among the controls.  It almost feels surreal
> > that this is suggested as a rationale for creating this chimera of a
> > knob.  What the hell is going on here?
> 
> People often overcommit the cgroup hard limits so that one cgroup can
> make use of a larger share of the machine when the other cgroups are
> idle.
> This works well only if you can depend on soft limits to steer reclaim
> when the other cgroups get active again.

And that's fine too.  If you take a step back, it shouldn't be
difficult to recognize that what you want is an actual soft limit at
the parent level overriding the allocation guarantee (for the lack of
a better name).  Don't overload "alloc guarantee" with that extra
meaning messing up its fundamental properties.  Create a separate
plane of control which is consistent within itself and give it
priority over "alloc guarantee".  You sure can discuss the details of
the override - should it be round-robin or proportional to whatever or
what, but that's a separate discussion and can be firmly labeled as
implementation details rather than this twisting of the fundamental
semantics of "softlimit".

I really am not saying any of the use cases that have been described
are invalid.  They all sound pretty useful, but, to me, what seems to
be recurring is that people want two separate features - actual soft
limit and allocation guarantee, and for some reason that I can't
understand, fail to recognize they're two very different controls and
try to put both into this one poor knob.

It's like trying to combine accelerator and (flipped) clutch on a
manual car.  Sure, it'll work fine while you're accelerating.  Good
luck while cruising or on a long downhill.  You can try to tweak it
all you want but things of course will get "interesting" and
"questionable" as soon as the conditions change from the specific use
cases which the specific tuning is made for.

While car analogies can often be misleading, really, please stop
trying to combine two completely separate controls into one knob.  It
won't and can't work and is totally stupid.

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>

  reply	other threads:[~2013-04-22 14:48 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-20  0:26 memcg: softlimit on internal nodes Tejun Heo
2013-04-20  0:42 ` Tejun Heo
2013-04-20  3:35   ` Greg Thelen
2013-04-21  1:53     ` Tejun Heo
2013-04-20  3:16 ` Michal Hocko
2013-04-21  2:23   ` Tejun Heo
2013-04-21  8:55     ` Michel Lespinasse
2013-04-22  4:24       ` Tejun Heo
2013-04-22  7:14         ` Michel Lespinasse
2013-04-22 14:48           ` Tejun Heo [this message]
2013-04-22 15:37         ` Michal Hocko
2013-04-22 15:46           ` Tejun Heo
2013-04-22 15:54             ` Michal Hocko
2013-04-22 16:01               ` Tejun Heo
2013-04-23  9:58               ` Michel Lespinasse
2013-04-23 10:17                 ` Glauber Costa
2013-04-23 11:40                   ` Michal Hocko
2013-04-23 11:54                     ` Glauber Costa
2013-04-23 12:51                     ` Michel Lespinasse
2013-04-23 13:06                       ` Michal Hocko
2013-04-23 13:13                         ` Glauber Costa
2013-04-23 13:28                           ` Michal Hocko
2013-04-23 11:32                 ` Michal Hocko
2013-04-23 12:45                   ` Michel Lespinasse
2013-04-23 12:59                     ` Michal Hocko
2013-04-23 12:51                 ` Michal Hocko
2013-04-21 12:46     ` Michal Hocko
2013-04-22  4:39       ` Tejun Heo
2013-04-22 15:19         ` Michal Hocko
2013-04-22 15:57           ` Tejun Heo
2013-04-22 15:57             ` Tejun Heo
2013-04-22 16:20             ` Michal Hocko
2013-04-22 18:30               ` Tejun Heo
2013-04-23  9:29                 ` Michal Hocko
2013-04-23 17:09                   ` Tejun Heo
2013-04-26 11:51                     ` Michal Hocko
2013-04-26 18:37                       ` Tejun Heo
2013-04-29 15:27                         ` Michal Hocko
2013-04-23  9:33                 ` [RFC v2 0/4] soft limit rework Michal Hocko
2013-04-23  9:33                   ` [RFC v2 1/4] memcg: integrate soft reclaim tighter with zone shrinking code Michal Hocko
2013-04-23  9:33                   ` [RFC v2 2/4] memcg: Get rid of soft-limit tree infrastructure Michal Hocko
2013-04-23  9:33                   ` [RFC v2 3/4] vmscan, memcg: Do softlimit reclaim also for targeted reclaim Michal Hocko
2013-04-23  9:33                   ` [RFC v2 4/4] memcg: Ignore soft limit until it is explicitly specified Michal Hocko
2013-04-24 21:45                 ` memcg: softlimit on internal nodes Johannes Weiner
2013-04-25  0:33                   ` Tejun Heo
2013-04-29 18:39                     ` Johannes Weiner

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=20130422144826.GA12543@htj.dyndns.org \
    --to=tj@kernel.org \
    --cc=bsingharora@gmail.com \
    --cc=cgroups@vger.kernel.org \
    --cc=glommer@parallels.com \
    --cc=gthelen@google.com \
    --cc=hannes@cmpxchg.org \
    --cc=hughd@google.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.cz \
    --cc=walken@google.com \
    --cc=yinghan@google.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;
as well as URLs for NNTP newsgroup(s).