[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120920132400.GC23872@dhcp22.suse.cz>
Date: Thu, 20 Sep 2012 15:24:00 +0200
From: Michal Hocko <mhocko@...e.cz>
To: David Rientjes <rientjes@...gle.com>
Cc: Tejun Heo <tj@...nel.org>, containers@...ts.linux-foundation.org,
cgroups@...r.kernel.org, linux-kernel@...r.kernel.org,
Li Zefan <lizefan@...wei.com>,
Glauber Costa <glommer@...allels.com>,
Peter Zijlstra <peterz@...radead.org>,
Paul Turner <pjt@...gle.com>,
Johannes Weiner <hannes@...xchg.org>,
Thomas Graf <tgraf@...g.ch>,
"Serge E. Hallyn" <serue@...ibm.com>,
Paul Mackerras <paulus@...ba.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
Neil Horman <nhorman@...driver.com>,
"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
Dave Jones <davej@...hat.com>,
Ben Hutchings <ben@...adent.org.uk>
Subject: Re: [PATCH 2.6.32] memcg: warn on deeper hierarchies with
use_hierarchy==0
On Wed 19-09-12 12:38:18, David Rientjes wrote:
> On Wed, 19 Sep 2012, Michal Hocko wrote:
>
> > diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> > index f99f599..b61c34b 100644
> > --- a/mm/memcontrol.c
> > +++ b/mm/memcontrol.c
> > @@ -3106,6 +3106,11 @@ mem_cgroup_create(struct cgroup_subsys *ss, struct cgroup *cont)
> > } else {
> > parent = mem_cgroup_from_cont(cont->parent);
> > mem->use_hierarchy = parent->use_hierarchy;
> > + WARN_ONCE(!mem->use_hierarchy && parent != root_mem_cgroup,
> > + "Creating hierarchies with use_hierarchy==0 "
> > + "(flat hierarchy) is considered deprecated. "
> > + "If you believe that your setup is correct, "
> > + "we kindly ask you to contact linux-mm@...ck.org and let us know");
>
> When I deprecated /proc/pid/oom_adj (now removed), we did a WARN_ONCE()
> and others complained that this unnecessarily alters userspace scripts
> that a serious issue has occurred and Linus agreed that we shouldn't do
> deprecation in this way. The alternative is to use printk_once() instead.
Yes printk_once is an alternative but I really wanted to have this as
much visible as possible. People tend to react to stack traceces more
and this one will trigger only if somebody is either doing something
wrong or the configuration is the one we are looking for.
Comparing to oom_adj, that one was used much more often so the WARN_ONCE
was too verbose especially when you usually had to wait for an userspace
update which is not the case here.
--
Michal Hocko
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists