Skip to contentSkip to conversation

ia64 problems with NR_CPUS > 256

DISCUSSION Andrew Morton 1 participant 1 message Jan 10, 2004

lore
Share & tools
lore
#0 lore raw
Quoted 7 lines · Rusty Russell

In message <[email protected]> you write:

Quoted 5 lines
Quoted 3 lines · [email protected] (Jesse Barnes) wrote:

Thanks, this patch works. However, it appears that something (not you Pat!) broke cpumasks again--I got failures when I tried a 512p build.

Quoted 7 lines
Quoted 4 lines

That's probably Rusty breaking stuff again. The relevant patches are:

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.1/2.6.1-mm1/broken-out/make-for_each_cpu-iterator-more-friendly.patch ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.1/2.6.1-mm1/broken-out/make-for_each_cpu-iterator-more-friendly-fix.patch

Probably. Paul Jackson acked them though, so I'm a little surprised.

OK, here's the scoop. ia64 with NR_CPUSQ2:

/usr/local/gcc-3.3.1/bin/gcc -Wp,-MD,kernel/.sched.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -pipe -ffixed-r13 -mfixed-rangeñ2-f15,f32-f127 -falign-functions2 -frename-registers -O2 -fomit-frame-pointer -mconstant-gp -DKBUILD_BASENAME=sched -DKBUILD_MODNAME=sched -c -o kernel/.tmp_sched.o kernel/sched.c
kernel/sched.c: In function `nr_uninterruptible':
kernel/sched.c:905: error: structure has no member named val' kernel/sched.c:905: error: structure has no member named val' kernel/sched.c: In function `nr_context_switches':

The problem is that Rusty's patch _used_ for_each_cpu(). It is already broken.

In cpumask_const_reference.h we have stuff like:

#define cpus_and_const(dst,src1,src2) cpus_and(dst,*(src1).val,*(src2).val)

But include/linux/cpumask.h never defines a version of struct cpumask which has a `val' member in it.

So somewhere along the line, the pass-by-reference stuff got broken.

Bill, how is this actually supposed to work? Is `val' supposed to be in struct cpumask, or is the cpumask_const_reference.h code wrong?

Thanks.