mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: john stultz <johnstul@us.ibm.com>
Cc: jes@trained-monkey.org, linux-kernel@vger.kernel.org,
	jbarnes@sgi.com, j-nomura@ce.jp.nec.com
Subject: Re: [patch] 2.6.4-rc1-mm2 page_alloc on NUMA
Date: Fri, 5 Mar 2004 17:46:34 -0800	[thread overview]
Message-ID: <20040305174634.763a5df7.akpm@osdl.org> (raw)
In-Reply-To: <1078536125.797.64.camel@cog.beaverton.ibm.com>

john stultz <johnstul@us.ibm.com> wrote:
>
> With 2.6.4-rc1-mm2, I'm still seeing compile errors in page_alloc even
> with this patch. Looks like the numa-aware-zonelist-builder patch isn't
> defining PENALTY_FOR_NODE_WITH_CPUS properly.

Yup.   I'll be fixing it thusly:



- Move the default definition of node_distance() and
  PENALTY_FOR_NODE_WITH_CPUS up a level into linux/topology.h.  This probably
  fixes ia64 CONFIG_NUMA builds.

- Make node_distance() a macro, since we're testing for its presence with
  #ifdef.



---

 include/asm-generic/topology.h |    7 -------
 include/asm-i386/topology.h    |    5 +----
 include/linux/topology.h       |    7 +++++++
 3 files changed, 8 insertions(+), 11 deletions(-)

diff -puN include/asm-generic/topology.h~numa-aware-zonelist-builder-fix-2 include/asm-generic/topology.h
--- 25/include/asm-generic/topology.h~numa-aware-zonelist-builder-fix-2	2004-03-03 23:40:22.000000000 -0800
+++ 25-akpm/include/asm-generic/topology.h	2004-03-03 23:40:42.000000000 -0800
@@ -45,13 +45,6 @@
 #define pcibus_to_cpumask(bus)	(cpu_online_map)
 #endif
 
-#ifndef node_distance
-#define node_distance(from,to)	(from != to)
-#endif
-#ifndef PENALTY_FOR_NODE_WITH_CPUS
-#define PENALTY_FOR_NODE_WITH_CPUS	(1)
-#endif
-
 /* Cross-node load balancing interval. */
 #ifndef NODE_BALANCE_RATE
 #define NODE_BALANCE_RATE 10
diff -puN include/asm-i386/topology.h~numa-aware-zonelist-builder-fix-2 include/asm-i386/topology.h
--- 25/include/asm-i386/topology.h~numa-aware-zonelist-builder-fix-2	2004-03-03 23:40:22.000000000 -0800
+++ 25-akpm/include/asm-i386/topology.h	2004-03-03 23:41:33.000000000 -0800
@@ -67,10 +67,7 @@ static inline cpumask_t pcibus_to_cpumas
 }
 
 /* Node-to-Node distance */
-static inline int node_distance(int from, int to)
-{
-	return (from != to);
-}
+#define node_distance(from, to) (from != to)
 
 /* Cross-node load balancing interval. */
 #define NODE_BALANCE_RATE 100
diff -puN include/linux/topology.h~numa-aware-zonelist-builder-fix-2 include/linux/topology.h
--- 25/include/linux/topology.h~numa-aware-zonelist-builder-fix-2	2004-03-03 23:40:22.000000000 -0800
+++ 25-akpm/include/linux/topology.h	2004-03-03 23:41:45.000000000 -0800
@@ -54,4 +54,11 @@ static inline int __next_node_with_cpus(
 #define for_each_node_with_cpus(node) \
 	for (node = 0; node < numnodes; node = __next_node_with_cpus(node))
 
+#ifndef node_distance
+#define node_distance(from,to)	(from != to)
+#endif
+#ifndef PENALTY_FOR_NODE_WITH_CPUS
+#define PENALTY_FOR_NODE_WITH_CPUS	(1)
+#endif
+
 #endif /* _LINUX_TOPOLOGY_H */

_


      reply	other threads:[~2004-03-06  1:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-03 16:57 Jes Sorensen
2004-03-06  1:22 ` john stultz
2004-03-06  1:46   ` Andrew Morton [this message]

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=20040305174634.763a5df7.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=j-nomura@ce.jp.nec.com \
    --cc=jbarnes@sgi.com \
    --cc=jes@trained-monkey.org \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®