Messages in this thread Patch in this message | | | Date | Fri, 5 Mar 2004 17:46:34 -0800 | From | Andrew Morton <> | Subject | Re: [patch] 2.6.4-rc1-mm2 page_alloc on NUMA |
| |
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 */ _
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |