I wonder why we don't have a proper cpu_to_node() yet, but as longas it doesn't exist please use __cpu_to_node() directly.

+#define LOADSCALE 128

Any explanation?

+#ifdef CONFIG_NUMA

sched.c uses #if CONFIG_FOO, not #ifdef CONFIG_FOO, it would be coolif you could follow the style of existing source files.

+/* Number of CPUs per node: sane values until all CPUs are up */+int _node_nr_cpus[MAX_NUMNODES] = { [0 ... MAX_NUMNODES-1] = NR_CPUS };+int node_ptr[MAX_NUMNODES+1]; /* first cpu of node (logical cpus are sorted!)*/+#define node_ncpus(node) _node_nr_cpus[node]Parametrized macros and variables aren't in the ßame namespace, what aboutjust node_nr_cpus for the macro, too. And should these be static?