linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: Christoph Lameter <cl@linux-foundation.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"hugh.dickins@tiscali.co.uk" <hugh.dickins@tiscali.co.uk>,
	akpm@linux-foundation.org,
	"kosaki.motohiro@jp.fujitsu.com" <kosaki.motohiro@jp.fujitsu.com>
Subject: Re: [RFC][PATCH] lib: generic percpu counter array
Date: Fri, 6 Nov 2009 09:56:05 +0900	[thread overview]
Message-ID: <20091106095605.0cc96ab5.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <alpine.DEB.1.10.0911051017310.25718@V090114053VZO-1>

On Thu, 5 Nov 2009 10:20:18 -0500 (EST)
Christoph Lameter <cl@linux-foundation.org> wrote:

> On Thu, 5 Nov 2009, KAMEZAWA Hiroyuki wrote:
> 
> > Anothter major percpu coutner is vm_stat[]. This patch implements
> > vm_stat[] style counter array in lib/percpu_counter.c
> > This is designed for introducing vm_stat[] style counter to memcg,
> > but maybe useful for other people. By using this, counter array
> > using percpu can be implemented easily in compact structure.
> 
> 
> Note that vm_stat support was written that way because we have extreme
> space constraints due to the need to keep statistics per zone and per cpu
> and avoid cache line pressure that would result through the use of big
> integer arrays per zone and per cpu. For a large number of zones and cpus
> this is desastrous.
> 
> If you only need to keep statistics per cpu for an entity then the vmstat
> approach is overkill. A per cpu allocation of a counter is enough.
> 
counter per memcg is required.
Memcg uses its own one but I want to remove it. (it doesn't consider memory
placement.)
What I can use under /lib is percpu_counter, but it's really overkill.

My concern on pure percpu counter is "read" side.
Now, we read counters only via status file and sometimes vmscan will read it.
For supporting dirty_ratio, we need to read them more.
I'll check I can move it to pure percpu counter as you do in mm_counters and
see how read side is affected by for_each_possible_cpu(). Anyway, it's
better than current one.

Thanks,
-Kame

--
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:[~2009-11-06  0:58 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-04  6:24 [PATCH] show per-process swap usage via procfs KAMEZAWA Hiroyuki
2009-11-04 19:15 ` Christoph Lameter
2009-11-04 23:25   ` KOSAKI Motohiro
2009-11-05  2:28     ` KAMEZAWA Hiroyuki
2009-11-05 15:04     ` Christoph Lameter
2009-11-08 17:04       ` Pavel Machek
2009-11-05  0:06   ` KAMEZAWA Hiroyuki
2009-11-05  5:16     ` [RFC][PATCH] lib: generic percpu counter array KAMEZAWA Hiroyuki
2009-11-05 15:15       ` Christoph Lameter
2009-11-06  0:49         ` KAMEZAWA Hiroyuki
2009-11-05 15:20       ` Christoph Lameter
2009-11-06  0:56         ` KAMEZAWA Hiroyuki [this message]
2009-11-05 14:41 ` [PATCH] show per-process swap usage via procfs KOSAKI Motohiro
2009-11-05 15:11 ` Minchan Kim
2009-11-05 23:48   ` KAMEZAWA Hiroyuki
2009-11-06  4:40     ` [PATCH] show per-process swap usage via procfs v2 KAMEZAWA Hiroyuki
2009-11-06 15:19       ` Minchan Kim
2009-11-11  2:25         ` [PATCH] show per-process swap usage via procfs v3 KAMEZAWA Hiroyuki
2009-11-12 15:20           ` Christoph Lameter
2009-11-13  1:51             ` KAMEZAWA Hiroyuki
2009-11-13  2:35               ` KAMEZAWA Hiroyuki

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=20091106095605.0cc96ab5.kamezawa.hiroyu@jp.fujitsu.com \
    --to=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux-foundation.org \
    --cc=hugh.dickins@tiscali.co.uk \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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