From: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: balbir@linux.vnet.ibm.com, kamezawa.hiroyu@jp.fujitsu.com,
kosaki.motohiro@jp.fujitsu.com, menage@google.com,
prarit@redhat.com, andi.kleen@intel.com, xemul@openvz.org,
lizf@cn.fujitsu.com, nishimura@mxp.nes.nec.co.jp,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: Help Resource Counters Scale better (v4)
Date: Wed, 12 Aug 2009 11:34:30 +0900 [thread overview]
Message-ID: <20090812113430.f69e7be9.nishimura@mxp.nes.nec.co.jp> (raw)
In-Reply-To: <20090811163159.ddc5f5fd.akpm@linux-foundation.org>
On Tue, 11 Aug 2009 16:31:59 -0700, Andrew Morton <akpm@linux-foundation.org> wrote:
> On Tue, 11 Aug 2009 20:14:05 +0530
> Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
>
> > Enhancement: Remove the overhead of root based resource counter accounting
> >
> > From: Balbir Singh <balbir@linux.vnet.ibm.com>
> >
> > This patch reduces the resource counter overhead (mostly spinlock)
> > associated with the root cgroup. This is a part of the several
> > patches to reduce mem cgroup overhead. I had posted other
> > approaches earlier (including using percpu counters). Those
> > patches will be a natural addition and will be added iteratively
> > on top of these.
> >
> > The patch stops resource counter accounting for the root cgroup.
> > The data for display is derived from the statisitcs we maintain
> > via mem_cgroup_charge_statistics (which is more scalable).
> >
> > The tests results I see on a 24 way show that
> >
> > 1. The lock contention disappears from /proc/lock_stats
> > 2. The results of the test are comparable to running with
> > cgroup_disable=memory.
> >
> > Please test/review.
>
> I don't get it.
>
> The patch apepars to skip accounting altogether for the root memcgroup
> and then adds some accounting back in for swap. Or something like
> that. How come? Do we actually not need the root memcgroup
> accounting?
>
IIUC, this patch doesn't remove the root memcgroup accounting, it just changes
the counter for root memcgroup accounting from res_counter to cpustat[cpu] to reduce
the lock congestion of res_counter especially on a big platform.
Using res_counter(lock, check limit, charge) for root memcgroup would be overkill
because root memcgroup has no limit now(by memcg-remove-the-overhead-associated-with-the-root-cgroup.patch).
And, MEM_CGROUP_STAT_SWAPOUT would be needed to show memsw.usage_in_bytes of root
memcgroup. We didn't have cpustat[cpu] counter for swap accounting so far.
> IOW, the changelog sucks ;)
>
> Is this an alternative approach to using percpu_counters, or do we do
> both or do we choose one or the other? res_counter_charge() really is
> quite sucky.
>
> The patch didn't have a signoff.
>
> It would be nice to finalise those performance testing results and
> include them in the new, improved patch description.
>
agreed.
Thanks,
Daisuke Nishimura.
--
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:[~2009-08-12 3:25 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-11 14:44 Balbir Singh
2009-08-11 14:54 ` Prarit Bhargava
2009-08-11 15:00 ` Balbir Singh
2009-08-11 15:11 ` Prarit Bhargava
2009-08-11 15:14 ` Prarit Bhargava
2009-08-11 15:20 ` Andi Kleen
2009-08-11 15:21 ` Prarit Bhargava
2009-08-11 16:52 ` Balbir Singh
2009-08-11 23:31 ` Andrew Morton
2009-08-12 2:34 ` Daisuke Nishimura [this message]
2009-08-12 3:56 ` Balbir Singh
2009-08-12 3:57 ` Balbir Singh
2009-08-12 4:57 ` [PATCH] Help Resource Counters Scale better (v4.1) Balbir Singh
2009-08-12 10:53 ` Prarit Bhargava
2009-08-12 16:19 ` KAMEZAWA Hiroyuki
2009-08-12 16:28 ` KAMEZAWA Hiroyuki
2009-08-12 17:19 ` Balbir Singh
2009-08-13 1:03 ` Daisuke Nishimura
2009-08-13 3:33 ` Balbir Singh
2009-08-13 5:08 ` Daisuke Nishimura
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=20090812113430.f69e7be9.nishimura@mxp.nes.nec.co.jp \
--to=nishimura@mxp.nes.nec.co.jp \
--cc=akpm@linux-foundation.org \
--cc=andi.kleen@intel.com \
--cc=balbir@linux.vnet.ibm.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lizf@cn.fujitsu.com \
--cc=menage@google.com \
--cc=prarit@redhat.com \
--cc=xemul@openvz.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