On Tue, Mar 14, 2006 at 03:23:21PM +0530, Srivatsa Vaddagiri wrote: > On Thu, Mar 09, 2006 at 05:56:36PM -0800, Bryce Harrington wrote: > > Hi Dipankar, > > > > Gerrit suggested you might be interested in this bug that we found as > > part of the OSDL DCL hotplug testing effort. I would love to know if > > there is a fix, as it is preventing the regression test from completing. I > > have encountered this on several kernels, for example linux-2.6.16-rc1: > > http://developer.osdl.org/dev/nfsv4/results/351/ > > Bryce, > There was a bug where we try to boot an already booted CPU, > which lead to the lockup. Patch below should fix that bug. With the > patch applied, hotplug01.sh works just fine for me. Can you confirm the same? Hi Srivatsa, Yes, this patch fixes the bug! I've just re-run the test on a 2-cpu x86 system with cpu hotplug and the test case that had been failing, now passes. CPU: 0 LOOPS: 1 LHCS_PATH: /root/lhcs_regression-1.1 Name: hotplug01 Date: Wed Mar 15 17:33:31 UTC 2006 Desc: What happens to disk controller interrupts when offlining CPUs? CPU is 0 Starting loop '1' offlining cpu1: OK offlining cpu0: OK onlining cpu1: OK onlining cpu0: OK IRQ CPU0 CPU1 IRQ0 1078 7 IRQ14 6 0 IRQ15 0 0 IRQ17 15 0 IRQ18 2 0 IRQ2 0 0 IRQ8 0 0 IRQERR 1 0 IRQLOC 1084 520 IRQMIS 0 0 IRQNMI 0 0 hotplug01: PASS: Loops left 1 Thanks, Bryce > > Check if cpu is already online. > > Signed-off-by : Srivatsa Vaddagiri <vatsa@xxxxxxxxxx> > > - > > arch/i386/kernel/smpboot.c | 6 ++++++ > 1 files changed, 6 insertions(+) > > diff -puN arch/i386/kernel/smpboot.c~cpuhp arch/i386/kernel/smpboot.c > --- linux-2.6.16-rc5/arch/i386/kernel/smpboot.c~cpuhp 2006-03-14 14:42:26.000000000 +0530 > +++ linux-2.6.16-rc5-root/arch/i386/kernel/smpboot.c 2006-03-14 14:43:21.000000000 +0530 > @@ -1029,6 +1029,12 @@ int __devinit smp_prepare_cpu(int cpu) > int apicid, ret; > > lock_cpu_hotplug(); > + > + if (cpu_online(cpu)) { > + ret = -EINVAL; > + goto exit; > + } > + > apicid = x86_cpu_to_apicid[cpu]; > if (apicid == BAD_APICID) { > ret = -ENODEV; > > _ > > -- > Regards, > vatsa