From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: Mel Gorman <mel@csn.ul.ie>
Cc: kosaki.motohiro@jp.fujitsu.com,
Christoph Lameter <cl@linux-foundation.org>,
Rik van Riel <riel@redhat.com>, Robin Holt <holt@sgi.com>,
"Zhang, Yanmin" <yanmin.zhang@intel.com>,
Wu Fengguang <fengguang.wu@intel.com>,
linux-ia64@vger.kernel.org, linuxppc-dev@ozlabs.org,
LKML <linux-kernel@vger.kernel.org>,
linux-mm <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v4] zone_reclaim is always 0 by default
Date: Tue, 9 Jun 2009 22:48:34 +0900 (JST) [thread overview]
Message-ID: <20090609211721.DD9A.A69D9226@jp.fujitsu.com> (raw)
In-Reply-To: <20090608115048.GA15070@csn.ul.ie>
Hi
sorry for late responce. my e-mail reading speed is very slow ;-)
First, Could you please read past thread?
I think many topic of this mail are already discussed.
> On Thu, Jun 04, 2009 at 07:23:15PM +0900, KOSAKI Motohiro wrote:
> >
> > Current linux policy is, zone_reclaim_mode is enabled by default if the machine
> > has large remote node distance. it's because we could assume that large distance
> > mean large server until recently.
> >
>
> We don't make assumptions about the server being large, small or otherwise. The
> affinity tables reporting a distance of 20 or more is saying "remote memory
> has twice the latency of local memory". This is true irrespective of workload
> and implies that going off-node has a real penalty regardless of workload.
No.
Now, we talk about off-node allocation vs unnecessary file cache dropping.
IOW, off-node allocation vs disk access.
Then, the worth doesn't only depend on off-node distance, but also depend on
workload IO tendency and IO speed.
Fujitsu has 64 core ia64 HPC box, zone-reclaim sometimes made performance
degression although its box.
So, I don't think this problem is small vs large machine issue.
nor i7 issue.
high-speed P2P CPU integrated memory controller expose old issue.
> > In general, workload depended configration shouldn't put into default settings.
> >
> > However, current code is long standing about two year. Highest POWER and IA64 HPC machine
> > (only) use this setting.
> >
> > Thus, x86 and almost rest architecture change default setting, but Only power and ia64
> > remain current configuration for backward-compatibility.
> >
>
> What about if it's x86-64-based NUMA but it's not i7 based. There, the
> NUMA distances might really mean something and that zone_reclaim behaviour
> is desirable.
hmmm..
I don't hope ignore AMD, I think it's common characterastic of P2P and
integrated memory controller machine.
Also, I don't hope detect CPU family or similar, because we need update
such code evey when Intel makes new cpu.
Can we detect P2P interconnect machine? I'm not sure.
> I think if we're going down the road of setting the default, it shouldn't be
> per-architecture defaults as such. Other choices for addressing this might be;
>
> 1. Make RECLAIM_DISTANCE a variable on x86. Set it to 20 by default, and 5
> (or some other sensible figure) on i7
>
> 2. There should be a per-arch modifier callback for the affinity
> distances. If the x86 code detects the CPU is an i7, it can reduce the
> reported latencies to be more in line with expected reality.
>
> 3. Do not use zone_reclaim() for file-backed data if more than 20% of memory
> overall is free. The difficulty is figuring out if the allocation is for
> file pages.
>
> 4. Change zone_reclaim_mode default to mean "do your best to figure it
> out". Patch 1 would default large distances to 1 to see what happens.
> Then apply a heuristic when in figure-it-out mode and using reclaim_mode == 1
>
> If we have locally reclaimed 2% of the nodes memory in file pages
> within the last 5 seconds when >= 20% of total physical memory was
> free, then set the reclaim_mode to 0 on the assumption the node is
> mostly caching pages and shouldn't be reclaimed to avoid excessive IO
>
> Option 1 would appear to be the most straight-forward but option 2
> should be doable. Option 3 and 4 could turn into a rats nest and I would
> consider those approaches a bit more drastic.
hmhm.
I think the key-point of option 1 and 2 are proper hardware detecting way.
option 3 and 4 are more prefere idea to me. I like workload adapted heuristic.
but you already pointed out its hard, because page-allocator don't know
allocation purpose ;)
> > @@ -10,6 +10,12 @@ struct device_node;
> >
> > #include <asm/mmzone.h>
> >
> > +/*
> > + * Distance above which we begin to use zone reclaim
> > + */
> > +#define RECLAIM_DISTANCE 20
> > +
> > +
>
> Where is the ia-64-specific modifier to RECAIM_DISTANCE?
arch/ia64/include/asm/topology.h has
/*
* Distance above which we begin to use zone reclaim
*/
#define RECLAIM_DISTANCE 15
I don't think distance==15 is machine independent proper definition.
but there is long lived definition ;)
--
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-06-09 13:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-04 10:23 KOSAKI Motohiro
2009-06-04 10:59 ` Wu Fengguang
2009-06-04 12:24 ` Robin Holt
2009-06-08 11:50 ` Mel Gorman
2009-06-09 9:55 ` Robin Holt
2009-06-09 10:37 ` Mel Gorman
2009-06-09 12:02 ` Robin Holt
2009-06-09 19:47 ` Andrew Morton
2009-06-09 13:48 ` KOSAKI Motohiro [this message]
2009-06-09 14:38 ` Mel Gorman
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=20090609211721.DD9A.A69D9226@jp.fujitsu.com \
--to=kosaki.motohiro@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux-foundation.org \
--cc=fengguang.wu@intel.com \
--cc=holt@sgi.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=mel@csn.ul.ie \
--cc=riel@redhat.com \
--cc=yanmin.zhang@intel.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