[BugReport] 2nd cpu does not work.

Ken-ichi Yaku (yaku@css1.kbnes.nec.co.jp)
Mon, 19 Apr 1999 21:41:13 +0900 (JST)


Hello.

We have installed 2.2.6 SMP kernel to our machine which has two CPUs
and two I/O APICs.

/proc/cpuinfo said kernel detected both cpus, but 2nd cpu did not work.
It means 2nd cpu kept running idle tasks.

We think that value of has_cpu flag in idle task is the cause of this
problem.

Even if 2nd cpu has idle task, has_cpu flag in idle task is not set.

Therefore scheduler can't deliver new tasks to 2nd cpu.
(keeps running idle task.)

We changed kernel code, and ran it.
Result was good. (Tasks were delivered to both cpus)

patch code
----------
diff -urN linux.org/arch/i386/kernel/smp.c linux/arch/i386/kernel/smp.c
--- linux.org/arch/i386/kernel/smp.c Tue Mar 30 04:14:50 1999
+++ linux/arch/i386/kernel/smp.c Mon Apr 19 20:07:22 1999
@@ -948,6 +948,7 @@
panic("No idle process for CPU %d", i);

idle->processor = i;
+ idle->has_cpu = 1;
__cpu_logical_map[cpucount] = i;
cpu_number_map[i] = cpucount;
----------

PPC source has same code in smp_boot_cpus().

I hope the above code will be included in the kernel soon.

Regards,
--------
Ken-ichi Yaku
NEC Software Kobe, Ltd

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/