linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michel Lespinasse <walken@google.com>
To: Tejun Heo <tj@kernel.org>
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 00:14:53 -0700	[thread overview]
Message-ID: <CANN689F7X1X4i1M=nteGan0POdVbBMu0xviuWN70f_BTv==3eA@mail.gmail.com> (raw)
In-Reply-To: <20130422042445.GA25089@mtj.dyndns.org>

On Sun, Apr 21, 2013 at 9:24 PM, Tejun Heo <tj@kernel.org> wrote:
> Hey, Michel.
>
>> I don't remember exactly when you left - during the session I
>> expressed to Michal that while I think his proposal is an improvement
>> over the current situation, I think his handling of internal nodes is
>> confus(ed/ing).
>
> 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.

>>> > Now, let's consider the following hierarchy just to be sure.  Let's
>>> > assume that A itself doesn't have any tasks for simplicity.
>>     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>> >
>>> >       A (h:16G s:4G)
>>> >      /            \
>>> >     /              \
>>> >  B (h:7G s:5G)    C (h:7G s:5G)
>>> >
>>> > For hardlimit, it is clear that A's limit won't do anything.
>>
>> One thing some people worry about is that B and C's configuration
>> might be under a different administrator's control than A's. That is,
>> we could have a situation where the machine's sysadmin set up A for
>> someone else to play with, and that other person set up B and C within
>> his cgroup. In this scenario, one of the issues has to be how do we
>> prevent B and C's configuration settings from reserving (or protecting
>> from reclaim) more memory than the machine's admin intended when he
>> configured A.
>
> 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.

> 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.

-- 
Michel "Walken" Lespinasse
A program is never fully debugged until the last user dies.

--
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  7:14 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 [this message]
2013-04-22 14:48           ` Tejun Heo
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='CANN689F7X1X4i1M=nteGan0POdVbBMu0xviuWN70f_BTv==3eA@mail.gmail.com' \
    --to=walken@google.com \
    --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=tj@kernel.org \
    --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).