Messages in this thread | | | Date | Wed, 7 Apr 2004 10:31:11 +0530 | From | Srivatsa Vaddagiri <> | Subject | Re: [Experimental CPU Hotplug PATCH] - Move migrate_all_tasks to CPU_DEAD handling |
| |
On Wed, Apr 07, 2004 at 01:54:34PM +1000, Rusty Russell wrote: > No, it really is required. > > The stop_machine thread runs on the cpu, then kicks everyone else off, > then does a complete() (in stop_machine.c:do_stop()). Without this > check, the complete() drags the sleeping process (which called > stop_machine) onto the dying CPU.
Precisely. That's why I ended up adding this in cpu_down!!
+ /* Ensure that we are not runnable on dying cpu */ + old_allowed = current->cpus_allowed; + tmp = CPU_MASK_ALL; + cpu_clear(cpu, tmp); + set_cpus_allowed(current, tmp);
I restore the mask though (under covers of lock_cpu_hotplug) before returning from cpu_down. Task should never see this violated affinity.
Rusty, What do you think abt the whole patch? It has withstood my stress-test harness :-)
--
Thanks and Regards, Srivatsa Vaddagiri, Linux Technology Center, IBM Software Labs, Bangalore, INDIA - 560017 - 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/
| |