From: Peter Zijlstra <peterz@infradead.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: David Miller <davem@davemloft.net>,
kosaki.motohiro@jp.fujitsu.com, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, cl@linux-foundation.org,
tokunaga.keiich@jp.fujitsu.com, travis <travis@sgi.com>
Subject: Re: [RFC][PATCH 2/2] quicklist shouldn't be proportional to # of CPUs
Date: Thu, 21 Aug 2008 11:32:34 +0200 [thread overview]
Message-ID: <1219311154.8651.96.camel@twins> (raw)
In-Reply-To: <20080821002757.b7c807ad.akpm@linux-foundation.org>
On Thu, 2008-08-21 at 00:27 -0700, Andrew Morton wrote:
> On Thu, 21 Aug 2008 00:13:22 -0700 (PDT) David Miller <davem@davemloft.net> wrote:
>
> > From: Andrew Morton <akpm@linux-foundation.org>
> > Date: Wed, 20 Aug 2008 23:46:15 -0700
> >
> > > On Wed, 20 Aug 2008 20:08:13 +0900 KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
> > >
> > > > + num_cpus_per_node = cpus_weight_nr(node_to_cpumask(node));
> > >
> > > sparc64 allmodconfig:
> > >
> > > mm/quicklist.c: In function `max_pages':
> > > mm/quicklist.c:44: error: invalid lvalue in unary `&'
> > >
> > > we seem to have a made a spectacular mess of cpumasks lately.
> >
> > It should explode similarly on x86, since it also defines node_to_cpumask()
> > as an inline function.
> >
> > IA64 seems to be one of the few platforms to define this as a macro
> > evaluating to the node-to-cpumask array entry, so it's clear what
> > platform Motohiro-san did build testing on :-)
>
> Seems to compile OK on x86_32, x86_64, ia64 and powerpc for some reason.
>
> This seems to fix things on sparc64:
>
> --- a/mm/quicklist.c~mm-quicklist-shouldnt-be-proportional-to-number-of-cpus-fix
> +++ a/mm/quicklist.c
> @@ -28,7 +28,7 @@ static unsigned long max_pages(unsigned
> unsigned long node_free_pages, max;
> int node = numa_node_id();
> struct zone *zones = NODE_DATA(node)->node_zones;
> - int num_cpus_per_node;
> + cpumask_t node_cpumask;
>
> node_free_pages =
> #ifdef CONFIG_ZONE_DMA
> @@ -41,8 +41,8 @@ static unsigned long max_pages(unsigned
>
> max = node_free_pages / FRACTION_OF_NODE_MEM;
>
> - num_cpus_per_node = cpus_weight_nr(node_to_cpumask(node));
> - max /= num_cpus_per_node;
> + node_cpumask = node_to_cpumask(node);
> + max /= cpus_weight_nr(node_cpumask);
>
> return max(max, min_pages);
> }
humm, I thought we wanted to keep cpumask_t stuff away from our stack -
since on insanely large SGI boxen (/me looks at mike) the thing becomes
512 bytes.
WARNING: multiple messages have this Message-ID (diff)
From: Peter Zijlstra <peterz@infradead.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: David Miller <davem@davemloft.net>,
kosaki.motohiro@jp.fujitsu.com, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, cl@linux-foundation.org,
tokunaga.keiich@jp.fujitsu.com, travis <travis@sgi.com>
Subject: Re: [RFC][PATCH 2/2] quicklist shouldn't be proportional to # of CPUs
Date: Thu, 21 Aug 2008 11:32:34 +0200 [thread overview]
Message-ID: <1219311154.8651.96.camel@twins> (raw)
In-Reply-To: <20080821002757.b7c807ad.akpm@linux-foundation.org>
On Thu, 2008-08-21 at 00:27 -0700, Andrew Morton wrote:
> On Thu, 21 Aug 2008 00:13:22 -0700 (PDT) David Miller <davem@davemloft.net> wrote:
>
> > From: Andrew Morton <akpm@linux-foundation.org>
> > Date: Wed, 20 Aug 2008 23:46:15 -0700
> >
> > > On Wed, 20 Aug 2008 20:08:13 +0900 KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
> > >
> > > > + num_cpus_per_node = cpus_weight_nr(node_to_cpumask(node));
> > >
> > > sparc64 allmodconfig:
> > >
> > > mm/quicklist.c: In function `max_pages':
> > > mm/quicklist.c:44: error: invalid lvalue in unary `&'
> > >
> > > we seem to have a made a spectacular mess of cpumasks lately.
> >
> > It should explode similarly on x86, since it also defines node_to_cpumask()
> > as an inline function.
> >
> > IA64 seems to be one of the few platforms to define this as a macro
> > evaluating to the node-to-cpumask array entry, so it's clear what
> > platform Motohiro-san did build testing on :-)
>
> Seems to compile OK on x86_32, x86_64, ia64 and powerpc for some reason.
>
> This seems to fix things on sparc64:
>
> --- a/mm/quicklist.c~mm-quicklist-shouldnt-be-proportional-to-number-of-cpus-fix
> +++ a/mm/quicklist.c
> @@ -28,7 +28,7 @@ static unsigned long max_pages(unsigned
> unsigned long node_free_pages, max;
> int node = numa_node_id();
> struct zone *zones = NODE_DATA(node)->node_zones;
> - int num_cpus_per_node;
> + cpumask_t node_cpumask;
>
> node_free_pages =
> #ifdef CONFIG_ZONE_DMA
> @@ -41,8 +41,8 @@ static unsigned long max_pages(unsigned
>
> max = node_free_pages / FRACTION_OF_NODE_MEM;
>
> - num_cpus_per_node = cpus_weight_nr(node_to_cpumask(node));
> - max /= num_cpus_per_node;
> + node_cpumask = node_to_cpumask(node);
> + max /= cpus_weight_nr(node_cpumask);
>
> return max(max, min_pages);
> }
humm, I thought we wanted to keep cpumask_t stuff away from our stack -
since on insanely large SGI boxen (/me looks at mike) the thing becomes
512 bytes.
--
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:[~2008-08-21 9:32 UTC|newest]
Thread overview: 86+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-20 11:05 [RFC][PATCH 0/2] Quicklist is slighly problematic KOSAKI Motohiro
2008-08-20 11:05 ` KOSAKI Motohiro
2008-08-20 11:07 ` [RFC][PATCH 1/2] Show quicklist at meminfo KOSAKI Motohiro
2008-08-20 11:07 ` KOSAKI Motohiro
2008-08-20 18:35 ` Andrew Morton
2008-08-20 18:35 ` Andrew Morton
2008-08-21 7:36 ` KOSAKI Motohiro
2008-08-21 7:36 ` KOSAKI Motohiro
2008-08-22 1:05 ` KOSAKI Motohiro
2008-08-22 1:05 ` KOSAKI Motohiro
2008-08-22 4:28 ` Andrew Morton
2008-08-22 4:28 ` Andrew Morton
2008-08-22 13:23 ` Robin Holt
2008-08-22 13:23 ` Robin Holt
2008-08-22 13:56 ` Christoph Lameter
2008-08-22 13:56 ` Christoph Lameter
2008-08-23 8:24 ` KOSAKI Motohiro
2008-08-23 8:24 ` KOSAKI Motohiro
2008-08-24 5:29 ` Andrew Morton
2008-08-24 5:29 ` Andrew Morton
2008-08-20 11:08 ` [RFC][PATCH 2/2] quicklist shouldn't be proportional to # of CPUs KOSAKI Motohiro
2008-08-20 11:08 ` KOSAKI Motohiro
2008-08-20 15:27 ` Christoph Lameter
2008-08-20 15:27 ` Christoph Lameter
2008-08-21 6:46 ` Andrew Morton
2008-08-21 6:46 ` Andrew Morton
2008-08-21 7:13 ` David Miller
2008-08-21 7:13 ` David Miller, Andrew Morton
2008-08-21 7:18 ` KOSAKI Motohiro
2008-08-21 7:18 ` KOSAKI Motohiro
2008-08-21 7:27 ` Andrew Morton
2008-08-21 7:27 ` Andrew Morton
2008-08-21 7:31 ` KOSAKI Motohiro
2008-08-21 7:31 ` KOSAKI Motohiro
2008-08-21 9:32 ` Peter Zijlstra [this message]
2008-08-21 9:32 ` Peter Zijlstra
2008-08-21 10:04 ` KOSAKI Motohiro
2008-08-21 10:04 ` KOSAKI Motohiro
2008-08-21 10:09 ` David Miller
2008-08-21 10:09 ` David Miller, KOSAKI Motohiro
2008-08-21 10:13 ` KOSAKI Motohiro
2008-08-21 10:13 ` KOSAKI Motohiro
2008-08-21 10:26 ` David Miller
2008-08-21 10:26 ` David Miller, KOSAKI Motohiro
2008-08-21 10:22 ` KOSAKI Motohiro
2008-08-21 10:22 ` KOSAKI Motohiro
2008-08-21 12:02 ` KOSAKI Motohiro
2008-08-21 12:02 ` KOSAKI Motohiro
2008-08-25 18:48 ` Mike Travis
2008-08-25 18:48 ` Mike Travis
2008-08-25 23:33 ` KOSAKI Motohiro
2008-08-25 23:33 ` KOSAKI Motohiro
2008-08-26 20:35 ` Mike Travis
2008-08-26 20:35 ` Mike Travis
2008-08-25 18:44 ` Mike Travis
2008-08-25 18:44 ` Mike Travis
2008-08-25 18:40 ` Mike Travis
2008-08-25 18:40 ` Mike Travis
2008-08-25 23:31 ` KOSAKI Motohiro
2008-08-25 23:31 ` KOSAKI Motohiro
2008-08-20 14:10 ` [RFC][PATCH 0/2] Quicklist is slighly problematic Christoph Lameter
2008-08-20 14:10 ` Christoph Lameter
2008-08-20 14:49 ` KOSAKI Motohiro
2008-08-20 14:49 ` KOSAKI Motohiro
2008-08-20 15:26 ` Christoph Lameter
2008-08-20 15:26 ` Christoph Lameter
2008-08-21 2:13 ` Robin Holt
2008-08-21 2:13 ` Robin Holt
2008-08-21 2:16 ` Robin Holt
2008-08-21 2:16 ` Robin Holt
2008-08-21 3:08 ` David Miller
2008-08-21 3:08 ` David Miller, Robin Holt
2008-08-21 13:10 ` Christoph Lameter
2008-08-21 13:10 ` Christoph Lameter
2008-08-20 18:31 ` Andrew Morton
2008-08-20 18:31 ` Andrew Morton
2008-08-21 2:42 ` Robin Holt
2008-08-21 2:42 ` Robin Holt
2008-08-21 13:07 ` Christoph Lameter
2008-08-21 13:07 ` Christoph Lameter
2008-08-21 13:14 ` Robin Holt
2008-08-21 13:14 ` Robin Holt
2008-08-21 13:18 ` Christoph Lameter
2008-08-21 13:18 ` Christoph Lameter
2008-08-21 13:45 ` Robin Holt
2008-08-21 13:45 ` Robin Holt
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=1219311154.8651.96.camel@twins \
--to=peterz@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=cl@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=tokunaga.keiich@jp.fujitsu.com \
--cc=travis@sgi.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.