linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.cz>
To: Glauber Costa <glommer@parallels.com>
Cc: cgroups@vger.kernel.org, linux-mm@kvack.org,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Johannes Weiner <hannes@cmpxchg.org>, Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH] memcg: first step towards hierarchical controller
Date: Tue, 26 Jun 2012 17:50:12 +0200	[thread overview]
Message-ID: <20120626155012.GG9566@tiehlicka.suse.cz> (raw)
In-Reply-To: <4FE9D501.3050004@parallels.com>

On Tue 26-06-12 19:28:01, Glauber Costa wrote:
[...]
> >>diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> >>index 9e710bc..037ddd4 100644
> >>--- a/mm/memcontrol.c
> >>+++ b/mm/memcontrol.c
> >>@@ -3949,6 +3949,8 @@ static int mem_cgroup_hierarchy_write(struct cgroup *cont, struct cftype *cft,
> >>  	if (memcg->use_hierarchy == val)
> >>  		goto out;
> >>
> >>+	WARN_ONCE((!parent_memcg && memcg->use_hierarchy && val == false),
> >>+		"Non-hierarchical memcg is considered for deprecation");
> >>  	/*
> >>  	 * If parent's use_hierarchy is set, we can't make any modifications
> >>  	 * in the child subtrees. If it is unset, then the change can
> >>@@ -5175,6 +5177,7 @@ mem_cgroup_create(struct cgroup *cont)
> >>  			INIT_WORK(&stock->work, drain_local_stock);
> >>  		}
> >>  		hotcpu_notifier(memcg_cpu_hotplug_callback, 0);
> >>+		memcg->use_hierarchy = true;
> >
> >So the only way to disable hierarchies is to do it on the root first
> >(before any children exist) and then start creating your groups?
> 
> Yes.
> 
> This is true after my patch.
> This is also true before my patch, if you set it to 1 in the root,
> and then tries to flip it back.

OK, fair enough. Having another tweaks for the 1st level cgroups would
change the behavior from the current state which is bad (so it wouldn't
be just hackish but stupid as well...).

Just make sure we are warning also deeper in the hierarchy (for cgconfig
cases) suggested by Johannes and you can add my Acked-by.

Please also mention that if anybody is really interested in the original
behavior, for what ever reasons, then the following cgconfig.conf should
do the trick

group . {
	memory {
		memory.use_hierarchy = 0;
	}
}

Thanks
-- 
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9    
Czech Republic

--
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:[~2012-06-26 15:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-26 13:30 Glauber Costa
2012-06-26 14:11 ` Johannes Weiner
2012-06-26 14:19   ` Peter Zijlstra
2012-06-26 14:38     ` Johannes Weiner
2012-06-26 14:38       ` Glauber Costa
2012-06-26 14:41       ` Peter Zijlstra
2012-06-26 14:29   ` Glauber Costa
2012-06-26 15:31   ` Glauber Costa
2012-06-26 15:37     ` Johannes Weiner
2012-06-26 15:27 ` Michal Hocko
2012-06-26 15:28   ` Glauber Costa
2012-06-26 15:50     ` Michal Hocko [this message]
2012-06-26 18:12 ` Tejun Heo
2012-06-26 18:22   ` Glauber Costa
2012-06-26 18:32     ` Tejun Heo
2012-06-26 22:12     ` 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=20120626155012.GG9566@tiehlicka.suse.cz \
    --to=mhocko@suse.cz \
    --cc=a.p.zijlstra@chello.nl \
    --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=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