From: Valdis.Kletnieks on
On Fri, 30 Apr 2010 14:02:27 EDT, Lee Schermerhorn said:

> Would you have time to try a few patches? I've been doing some rework
> of the generic percpu numa_node/numa_mem patches. This rework should
> solve the build problem you encountered.

Not sure if I bollixed up adding the patches to the series file, that
section now looks like:

% grep -n ^numa series
1465:numa-add-generic-percpu-var-numa_node_id-implementation.patch
1466:numa-add-generic-percpu-var-numa_node_id-implementation-fix1.patch
1467:numa-add-generic-percpu-var-numa_node_id-implementation-fix2.patch
1468:numa-x86_64-use-generic-percpu-var-numa_node_id-implementation.patch
1469:numa-x86_64-use-generic-percpu-var-numa_node_id-implementation-fix1.patch
1470:numa-x86_64-use-generic-percpu-var-numa_node_id-implementation-fix2.patch
1471:numa-ia64-use-generic-percpu-var-numa_node_id-implementation.patch
1473:numa-introduce-numa_mem_id-effective-local-memory-node-id.patch
1474:numa-introduce-numa_mem_id-effective-local-memory-node-id-fix.patch
1475:numa-introduce-numa_mem_id-effective-local-memory-node-id-fix2.patch
1476:numa-introduce-numa_mem_id-effective-local-memory-node-id-fix3.patch
1477:numa-ia64-support-numa_mem_id-for-memoryless-nodes.patch
1478:numa-slab-use-numa_mem_id-for-slab-local-memory-node.patch
1479:numa-in-kernel-profiling-use-cpu_to_mem-for-per-cpu-allocations.patch
1480:numa-update-documentation-vm-numa-add-memoryless-node-info.patch
1481:numa-update-documentation-vm-numa-add-memoryless-node-info-fix1.patch

and it dies with:

LANG=C make
CHK include/linux/version.h
CHK include/generated/utsrelease.h
CC arch/x86/kernel/asm-offsets.s
In file included from include/linux/gfp.h:7,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from include/linux/crypto.h:21,
from arch/x86/kernel/asm-offsets_64.c:8,
from arch/x86/kernel/asm-offsets.c:4:
include/linux/topology.h:246: error: redefinition of 'numa_node_id'
/usr/src/linux-2.6.34-rc5-mmotm0428/arch/x86/include/asm/topology.h:163: note: previous definition of 'numa_node_id' was here
make[1]: *** [arch/x86/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2

X86_64 build, CONFIG_NUMA=n - looks like include/linux/topology.h doesn't
play nice in the !CONFIG_USE_PERCPU_NUMA_NODE_ID case...

From: Lee Schermerhorn on
On Fri, 2010-04-30 at 14:47 -0400, Valdis.Kletnieks(a)vt.edu wrote:
> On Fri, 30 Apr 2010 14:02:27 EDT, Lee Schermerhorn said:
>
> > Would you have time to try a few patches? I've been doing some rework
> > of the generic percpu numa_node/numa_mem patches. This rework should
> > solve the build problem you encountered.

Thanks for the quick turn around!

>
> Not sure if I bollixed up adding the patches to the series file, that
> section now looks like:
>
> % grep -n ^numa series
> 1465:numa-add-generic-percpu-var-numa_node_id-implementation.patch
> 1466:numa-add-generic-percpu-var-numa_node_id-implementation-fix1.patch
> 1467:numa-add-generic-percpu-var-numa_node_id-implementation-fix2.patch
> 1468:numa-x86_64-use-generic-percpu-var-numa_node_id-implementation.patch
> 1469:numa-x86_64-use-generic-percpu-var-numa_node_id-implementation-fix1.patch
> 1470:numa-x86_64-use-generic-percpu-var-numa_node_id-implementation-fix2.patch
> 1471:numa-ia64-use-generic-percpu-var-numa_node_id-implementation.patch
> 1473:numa-introduce-numa_mem_id-effective-local-memory-node-id.patch
> 1474:numa-introduce-numa_mem_id-effective-local-memory-node-id-fix.patch
> 1475:numa-introduce-numa_mem_id-effective-local-memory-node-id-fix2.patch
> 1476:numa-introduce-numa_mem_id-effective-local-memory-node-id-fix3.patch
> 1477:numa-ia64-support-numa_mem_id-for-memoryless-nodes.patch
> 1478:numa-slab-use-numa_mem_id-for-slab-local-memory-node.patch
> 1479:numa-in-kernel-profiling-use-cpu_to_mem-for-per-cpu-allocations.patch
> 1480:numa-update-documentation-vm-numa-add-memoryless-node-info.patch
> 1481:numa-update-documentation-vm-numa-add-memoryless-node-info-fix1.patch

That looks right.

>
> and it dies with:
>
> LANG=C make
> CHK include/linux/version.h
> CHK include/generated/utsrelease.h
> CC arch/x86/kernel/asm-offsets.s
> In file included from include/linux/gfp.h:7,
> from include/linux/kmod.h:22,
> from include/linux/module.h:13,
> from include/linux/crypto.h:21,
> from arch/x86/kernel/asm-offsets_64.c:8,
> from arch/x86/kernel/asm-offsets.c:4:
> include/linux/topology.h:246: error: redefinition of 'numa_node_id'
> /usr/src/linux-2.6.34-rc5-mmotm0428/arch/x86/include/asm/topology.h:163: note: previous definition of 'numa_node_id' was here
> make[1]: *** [arch/x86/kernel/asm-offsets.s] Error 1
> make: *** [prepare0] Error 2
>
> X86_64 build, CONFIG_NUMA=n - looks like include/linux/topology.h doesn't
> play nice in the !CONFIG_USE_PERCPU_NUMA_NODE_ID case...
>

Hmmm. I tested that before I sent it. I was getting that error before
I added the "override" definition to arch/x86/include/asm/topology.h.

Let me see what I did wrong...

Thanks

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Valdis.Kletnieks on
On Wed, 28 Apr 2010 16:53:32 PDT, akpm(a)linux-foundation.org said:
> The mm-of-the-moment snapshot 2010-04-28-16-53 has been uploaded to
>
> http://userweb.kernel.org/~akpm/mmotm/

Dies trying to compile mm/slab.c because something screwed the pooch with
the definition of numa_mem_id(). My bets are on
numa-slab-use-numa_mem_id-for-slab-local-memory-node.patch

CC mm/slab.o
mm/slab.c: In function 'kmem_cache_init':
mm/slab.c:1506: error: 'numa_node' undeclared (first use in this function)
mm/slab.c:1506: error: (Each undeclared identifier is reported only once
mm/slab.c:1506: error: for each function it appears in.)
mm/slab.c:1506: warning: type defaults to 'int' in declaration of 'pscr_ret__'
mm/slab.c:1506: warning: type defaults to 'int' in declaration of 'type name'
mm/slab.c:1506: warning: cast from pointer to integer of different size
mm/slab.c:1506: warning: type defaults to 'int' in declaration of 'pfo_ret__'
mm/slab.c:1506: warning: type defaults to 'int' in declaration of 'pfo_ret__'
mm/slab.c:1506: warning: type defaults to 'int' in declaration of 'pfo_ret__'
mm/slab.c:1506: warning: type defaults to 'int' in declaration of 'pfo_ret__'
mm/slab.c: In function 'setup_cpu_cache':
mm/slab.c:2148: error: 'numa_node' undeclared (first use in this function)
mm/slab.c:2148: warning: type defaults to 'int' in declaration of 'pscr_ret__'
mm/slab.c:2148: warning: type defaults to 'int' in declaration of 'type name'
mm/slab.c:2148: warning: cast from pointer to integer of different size
mm/slab.c:2148: warning: type defaults to 'int' in declaration of 'pfo_ret__'
mm/slab.c:2148: warning: type defaults to 'int' in declaration of 'pfo_ret__'
mm/slab.c:2148: warning: type defaults to 'int' in declaration of 'pfo_ret__'
mm/slab.c:2148: warning: type defaults to 'int' in declaration of 'pfo_ret__'
mm/slab.c: In function 'do_drain':
mm/slab.c:2506: error: 'numa_node' undeclared (first use in this function)
mm/slab.c:2506: warning: type defaults to 'int' in declaration of 'pscr_ret__'
mm/slab.c:2506: warning: type defaults to 'int' in declaration of 'type name'
mm/slab.c:2506: warning: cast from pointer to integer of different size
mm/slab.c:2506: warning: type defaults to 'int' in declaration of 'pfo_ret__'
mm/slab.c:2506: warning: type defaults to 'int' in declaration of 'pfo_ret__'
mm/slab.c:2506: warning: type defaults to 'int' in declaration of 'pfo_ret__'
mm/slab.c:2506: warning: type defaults to 'int' in declaration of 'pfo_ret__'
mm/slab.c: In function 'cache_alloc_refill':
mm/slab.c:3039: error: 'numa_node' undeclared (first use in this function)
mm/slab.c:3039: warning: type defaults to 'int' in declaration of 'pscr_ret__'
mm/slab.c:3039: warning: type defaults to 'int' in declaration of 'type name'
mm/slab.c:3039: warning: cast from pointer to integer of different size
mm/slab.c:3039: warning: type defaults to 'int' in declaration of 'pfo_ret__'
mm/slab.c:3039: warning: type defaults to 'int' in declaration of 'pfo_ret__'
mm/slab.c:3039: warning: type defaults to 'int' in declaration of 'pfo_ret__'
mm/slab.c:3039: warning: type defaults to 'int' in declaration of 'pfo_ret__'
mm/slab.c: In function 'cache_flusharray':
mm/slab.c:3575: error: 'numa_node' undeclared (first use in this function)
mm/slab.c:3575: warning: type defaults to 'int' in declaration of 'pscr_ret__'
mm/slab.c:3575: warning: type defaults to 'int' in declaration of 'type name'
mm/slab.c:3575: warning: cast from pointer to integer of different size
mm/slab.c:3575: warning: type defaults to 'int' in declaration of 'pfo_ret__'
mm/slab.c:3575: warning: type defaults to 'int' in declaration of 'pfo_ret__'
mm/slab.c:3575: warning: type defaults to 'int' in declaration of 'pfo_ret__'
mm/slab.c:3575: warning: type defaults to 'int' in declaration of 'pfo_ret__'
mm/slab.c: In function 'cache_reap':
mm/slab.c:4139: error: 'numa_node' undeclared (first use in this function)
mm/slab.c:4139: warning: type defaults to 'int' in declaration of 'pscr_ret__'
mm/slab.c:4139: warning: type defaults to 'int' in declaration of 'type name'
mm/slab.c:4139: warning: cast from pointer to integer of different size
mm/slab.c:4139: warning: type defaults to 'int' in declaration of 'pfo_ret__'
mm/slab.c:4139: warning: type defaults to 'int' in declaration of 'pfo_ret__'
mm/slab.c:4139: warning: type defaults to 'int' in declaration of 'pfo_ret__'
mm/slab.c:4139: warning: type defaults to 'int' in declaration of 'pfo_ret__'
make[1]: *** [mm/slab.o] Error 1
make: *** [mm] Error 2

line 1506: node = numa_mem_id();
line 2148: cachep->nodelists[numa_mem_id()]->next_reap =
line 2506: int node = numa_mem_id();
line 3039: node = numa_mem_id();
line 3575: int node = numa_mem_id();
line 3139: int node = numa_mem_id();

Looks like a twisty little maze of cpp macros in each case, probably
related to this:

% grep -i numa .config
# CONFIG_NUMA is not set