linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: Nick Piggin <npiggin@kernel.dk>
Cc: kosaki.motohiro@jp.fujitsu.com, Christoph Lameter <cl@linux.com>,
	Christoph Hellwig <hch@infradead.org>,
	akpm@linux-foundation.org, Pekka Enberg <penberg@cs.helsinki.fi>,
	David Rientjes <rientjes@google.com>,
	linux-mm@kvack.org, Andi Kleen <andi@firstfloor.org>
Subject: Re: shrinkers: Add node to indicate where to target shrinking
Date: Mon, 25 Oct 2010 09:57:13 +0900 (JST)	[thread overview]
Message-ID: <20101025095004.9157.A69D9226@jp.fujitsu.com> (raw)
In-Reply-To: <20101024014256.GD3168@amd>

> On Fri, Oct 22, 2010 at 11:32:37AM -0500, Christoph Lameter wrote:
> > On Fri, 22 Oct 2010, Christoph Hellwig wrote:
> > >
> > > I think making shrinking decision per-zone is fine.  But do we need to
> > > duplicate all the lru lists and infrastructure per-zone for that instead
> > > of simply per-zone?   Even with per-node lists we can easily skip over
> > > items from the wrong zone.
> > >
> > > Given that we have up to 6 zones per node currently, and we would mostly
> > > use one with a few fallbacks that seems like a lot of overkill.
> > 
> > Zones can also cause asymmetry in reclaim if per zone reclaim is done.
> > 
> > Look at the following zone setup of a Dell R910:
> > 
> > grep "^Node" /proc/zoneinfo
> > Node 0, zone      DMA
> > Node 0, zone    DMA32
> > Node 0, zone   Normal
> > Node 1, zone   Normal
> > Node 2, zone   Normal
> > Node 3, zone   Normal
> > 
> > A reclaim that does per zone reclaim (but in reality reclaims all objects
> > in a node (or worse as most shrinkers do today in the whole system) will
> > put 3x the pressure on node 0.
> 
> No it doesn't. This is how it works:
> 
> node0zoneD has 1% of pagecache for node 0
> node0zoneD32 has 9% of pagecache
> node0zoneN has 90% of pagecache
> 
> If there is a memory shortage in all node0 zones, the first zone will
> get 1% of the pagecache scanning pressure, dma32 will get 9% and normal
> will get 90%, for equal pressure on each zone.
> 
> In my patch, those numbers will pass through to shrinker for each zone,
> and ask the shrinker to scan and equal proportion of objects in each of
> its zones.
> 
> If you have a per node shrinker, you will get asymmetries in pressures
> whenever there is not an equal amount of reclaimable objects in all
> the zones of a node.

Interesting. your explanation itself seems correct. but it inspire me
that there is another issue in both Christoph and your patch.

On ideal 32bit highmem system, memory usage are

	DMA:	unused
	NORMAL:	100% slab, 0% page cache
	HIGHMEM: 0% slab, 100% page cache

So, per-zone slab/page-cache shrinker balancing logic don't works on
32bit x86. kswapd should reclaim some objects from normal zone even if
it couldn't reclaim any page cache from normal zone.



--
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:[~2010-10-25  0:57 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-21 17:59 vmscan: Do not run shrinkers for zones other than ZONE_NORMAL Christoph Lameter
2010-10-21 18:00 ` shrinkers: Add node to indicate where to target shrinking Christoph Lameter
2010-10-21 18:12   ` Andi Kleen
2010-10-21 20:57   ` David Rientjes
2010-10-21 21:07     ` Christoph Lameter
2010-10-22 13:27     ` Andi Kleen
2010-10-21 23:58   ` Nick Piggin
2010-10-22 12:12     ` Andi Kleen
2010-10-22 15:55     ` Christoph Hellwig
2010-10-22 16:32       ` Christoph Lameter
2010-10-24  1:42         ` Nick Piggin
2010-10-25  0:57           ` KOSAKI Motohiro [this message]
2010-10-25 14:59           ` Christoph Lameter
2010-11-09  4:03             ` Nick Piggin
2010-10-22 16:46       ` Andi Kleen
2010-10-24  1:31       ` Nick Piggin
2010-11-14  2:26   ` Michel Lespinasse
2010-11-14  7:10     ` KOSAKI Motohiro
2010-11-14 11:05       ` Michel Lespinasse
2010-11-15  0:29         ` KOSAKI Motohiro
2010-10-21 18:13 ` vmscan: Do not run shrinkers for zones other than ZONE_NORMAL Andi Kleen
2010-10-21 18:22   ` Christoph Lameter
2010-10-21 18:27   ` Christoph Lameter
2010-10-21 18:33     ` Andi Kleen
2010-10-21 20:48     ` David Rientjes
2010-10-21 20:54       ` Christoph Lameter
2010-10-21 19:40 ` Andrew Morton
2010-10-21 20:03   ` Christoph Lameter
2010-10-21 20:14     ` Andrew Morton
2010-10-21 20:28       ` Christoph Lameter
2010-10-21 20:36         ` Andrew Morton
2010-10-21 20:49           ` Christoph Lameter
2010-10-21 20:59             ` Andrew Morton
2010-10-21 21:13               ` Christoph Lameter
2010-10-21 21:21                 ` Andrew Morton
2010-10-21 23:04                   ` Christoph Lameter
2010-10-21 23:56 ` Nick Piggin
2010-10-22  1:37 ` KOSAKI Motohiro
2010-10-22 14:06   ` Christoph Lameter
2010-10-24  1:37     ` Nick Piggin
2010-10-25  1:22     ` KOSAKI Motohiro
2010-10-25 15:07       ` Christoph Lameter
2010-10-26  2:52         ` KOSAKI Motohiro
2010-10-26 12:42           ` KOSAKI Motohiro
2010-10-26 13:10           ` Christoph Lameter

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=20101025095004.9157.A69D9226@jp.fujitsu.com \
    --to=kosaki.motohiro@jp.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=cl@linux.com \
    --cc=hch@infradead.org \
    --cc=linux-mm@kvack.org \
    --cc=npiggin@kernel.dk \
    --cc=penberg@cs.helsinki.fi \
    --cc=rientjes@google.com \
    /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