From: Michal Hocko <mhocko@suse.cz>
To: Glauber Costa <glommer@parallels.com>
Cc: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org,
linux-mm@kvack.org, devel@openvz.org,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Mel Gorman <mgorman@suse.de>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [RFC 1/4] memcg: provide root figures from system totals
Date: Tue, 2 Oct 2012 11:34:33 +0200 [thread overview]
Message-ID: <20121002093433.GA1293@dhcp22.suse.cz> (raw)
In-Reply-To: <506AB0BF.9030400@parallels.com>
On Tue 02-10-12 13:15:43, Glauber Costa wrote:
> On 10/01/2012 09:00 PM, Michal Hocko wrote:
> > On Tue 25-09-12 12:52:50, Glauber Costa wrote:
> >> > For the root memcg, there is no need to rely on the res_counters.
> > This is true only if there are no children groups but once there is at
> > least one we have to move global statistics into root res_counter and
> > start using it since then. This is a tricky part because it has to be
> > done atomically so that we do not miss anything.
> >
> Why can't we shortcut it all the time?
Because it has its own tasks and we are still not at use_hierarchy := 1
> It makes a lot of sense to use the root cgroup as the sum of everything,
> IOW, global counters. Otherwise you are left in a situation where you
> had global statistics, and all of a sudden, when a group is created, you
> start having just a subset of that, excluding the tasks in root.
Yes because if there are no other tasks then, well, global == root. Once
you have more groups (with tasks of course) then it depends on our
favorite use_hierarchy buddy.
> If we can always assume root will have the sum of *all* tasks, including
> the ones in root, we should never need to rely on root res_counters.
but we are not there yet.
--
Michal Hocko
SUSE Labs
--
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>
next prev parent reply other threads:[~2012-10-02 9:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-25 8:52 [RFC 0/4] bypass charges if memcg is not used Glauber Costa
2012-09-25 8:52 ` [RFC 1/4] memcg: provide root figures from system totals Glauber Costa
2012-10-01 17:00 ` Michal Hocko
2012-10-02 9:15 ` Glauber Costa
2012-10-02 9:34 ` Michal Hocko [this message]
2012-09-25 8:52 ` [RFC 2/4] memcg: make it suck faster Glauber Costa
2012-09-25 21:02 ` Andrew Morton
2012-09-26 8:53 ` Glauber Costa
2012-09-26 9:03 ` Daniel P. Berrange
2012-09-25 8:52 ` [RFC 3/4] memcg: do not call page_cgroup_init at system_boot Glauber Costa
2012-09-25 8:52 ` [RFC 4/4] memcg: do not walk all the way to the root for memcg 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=20121002093433.GA1293@dhcp22.suse.cz \
--to=mhocko@suse.cz \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=devel@openvz.org \
--cc=glommer@parallels.com \
--cc=hannes@cmpxchg.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
/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).