From: Andrew Morton <akpm@linux-foundation.org>
To: Michal Hocko <mhocko@suse.cz>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
LKML <linux-kernel@vger.kernel.org>,
Jack Steiner <steiner@sgi.com>,
Lee Schermerhorn <lee.schermerhorn@hp.com>,
Christoph Lameter <cl@linux-foundation.org>,
Pekka Enberg <penberg@cs.helsinki.fi>,
Paul Menage <menage@google.com>, Robin Holt <holt@sgi.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-mm@kvack.org
Subject: Re: [PATCH v2] cpusets: randomize node rotor used in cpuset_mem_spread_node()
Date: Thu, 26 May 2011 15:33:19 -0700 [thread overview]
Message-ID: <20110526153319.b7e8c0b6.akpm@linux-foundation.org> (raw)
In-Reply-To: <20110415082051.GB8828@tiehlicka.suse.cz>
On Fri, 15 Apr 2011 10:20:51 +0200
Michal Hocko <mhocko@suse.cz> wrote:
> Some workloads that create a large number of small files tend to assign
> too many pages to node 0 (multi-node systems). Part of the reason is that
> the rotor (in cpuset_mem_spread_node()) used to assign nodes starts at
> node 0 for newly created tasks.
>
> This patch changes the rotor to be initialized to a random node number of
> the cpuset. We are initializating it lazily in cpuset_mem_spread_node
> resp. cpuset_slab_spread_node.
>
>
> ...
>
> --- a/kernel/cpuset.c
> +++ b/kernel/cpuset.c
> @@ -2465,11 +2465,19 @@ static int cpuset_spread_node(int *rotor)
>
> int cpuset_mem_spread_node(void)
> {
> + if (current->cpuset_mem_spread_rotor == -1)
> + current->cpuset_mem_spread_rotor =
> + node_random(¤t->mems_allowed);
> +
> return cpuset_spread_node(¤t->cpuset_mem_spread_rotor);
> }
>
> int cpuset_slab_spread_node(void)
> {
> + if (current->cpuset_slab_spread_rotor == -1)
> + current->cpuset_slab_spread_rotor
> + = node_random(¤t->mems_allowed);
> +
> return cpuset_spread_node(¤t->cpuset_slab_spread_rotor);
> }
>
alpha allmodconfig:
kernel/built-in.o: In function `cpuset_slab_spread_node':
(.text+0x67360): undefined reference to `node_random'
kernel/built-in.o: In function `cpuset_slab_spread_node':
(.text+0x67368): undefined reference to `node_random'
kernel/built-in.o: In function `cpuset_mem_spread_node':
(.text+0x673b8): undefined reference to `node_random'
kernel/built-in.o: In function `cpuset_mem_spread_node':
(.text+0x673c0): undefined reference to `node_random'
because it has CONFIG_NUMA=n, CONFIG_NODES_SHIFT=7.
We use "#if MAX_NUMNODES > 1" in nodemask.h, but we use CONFIG_NUMA
when deciding to build mempolicy.o. That's a bit odd - why didn't
nodemask.h use CONFIG_NUMA?
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2011-05-26 22:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20110414065146.GA19685@tiehlicka.suse.cz>
[not found] ` <20110414160145.0830.A69D9226@jp.fujitsu.com>
[not found] ` <20110415161831.12F8.A69D9226@jp.fujitsu.com>
2011-04-15 8:20 ` [PATCH v2] cpusets: randomize node rotor used in cpuset_mem_spread_node() Michal Hocko
2011-04-15 8:29 ` KOSAKI Motohiro
2011-04-15 8:31 ` Michal Hocko
2011-04-15 23:42 ` David Rientjes
2011-04-18 8:42 ` [PATCH incremental] cpusets: initialize spread rotor lazily Michal Hocko
2011-04-18 20:19 ` David Rientjes
2011-04-18 21:29 ` Michal Hocko
2011-04-19 1:15 ` David Rientjes
2011-05-26 22:33 ` Andrew Morton [this message]
2011-05-27 12:47 ` [PATCH v2] cpusets: randomize node rotor used in cpuset_mem_spread_node() Michal Hocko
2011-05-27 19:07 ` David Rientjes
2011-05-27 23:17 ` Michal Hocko
2011-05-27 23:27 ` David Rientjes
2011-05-27 23:40 ` Michal Hocko
2011-05-27 21:20 ` Andrew Morton
2011-05-27 23:17 ` Michal Hocko
2011-05-27 23:30 ` David Rientjes
2011-05-27 23:38 ` Michal Hocko
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=20110526153319.b7e8c0b6.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=cl@linux-foundation.org \
--cc=holt@sgi.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=lee.schermerhorn@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=menage@google.com \
--cc=mhocko@suse.cz \
--cc=penberg@cs.helsinki.fi \
--cc=steiner@sgi.com \
--cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).