Messages in this thread |  | | | Date | Mon, 3 Apr 2006 09:10:28 -0500 | | From | Nathan Lynch <> | | Subject | Re: Fw: 2.6.16 crashes when running numastat on p575 |
| |
Christoph Lameter wrote: > On Sun, 2 Apr 2006, Paul Jackson wrote: > > > - for (cpu = 0; cpu < NR_CPUS; cpu++) { > > + for_each_online_cpu(cpu) { > > > > Idle curiosity -- what keeps a cpu from going offline during > > this scan, and leaving us with the same crash as before? > > Nothing keeps a processor from going offline. We could take the hotplug > lock for every for_each_online_cpu() in the kernel.
In this case, disabling preempt around the for_each_online_cpu loop would prevent any cpu from going down in the meantime. But since this function doesn't look like it's a hot path, and we're potentially traversing lots of zones and cpus, lock_cpu_hotplug might be preferable.
As Paul noted, the fix as it stands isn't adequate. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |