Re: [Experimental CPU Hotplug PATCH] - Move migrate_all_tasks toCPU_DEAD handling

From: Nick Piggin
Date: Mon Apr 05 2004 - 20:32:41 EST


Nick Piggin wrote:
Srivatsa Vaddagiri wrote:

On Tue, Apr 06, 2004 at 10:28:53AM +1000, Nick Piggin wrote:

First of all, if you're proposing this stuff for inclusion, you
should port it to the -mm tree, because I don't think Andrew
will want any other scheduler work going in just now. It wouldn't
be too hard.



Will send out today a patch against latest -mm tree!


I think my stuff is a bit orthogonal to what you're attempting.
And they should probably work well together. My "lazy migrate"
patch means the tasklist lock does not need to be held at all,
only the dying runqueue's lock.



Is there some place where I can download your patch (or is it in -mm tree)?



I have attached it (against 2.6.5-mm1). I haven't actually tested it
#ifdef CONFIG_SMP
- if (unlikely(task_running(rq, p) || cpu_is_offline(this_cpu)))
+ if (unlikely(task_running(rq, p))
goto out_activate;
new_cpu = cpu;
+#ifdef CONFIG_HOTPLUG_CPU
+ if (unlikely(cpu_is_offline(cpu))) {
+ /* Must lazy-migrate off this CPU */
+ goto out_set_cpu;
+ }
+#endif
+

Err, that should be:
#ifdef CONFIG_HOTPULG_CPU
if (unlikely(cpu_is_offline(cpu))) {
/* Must lazy-migrate off this CPU */
new_cpu = go_away(p);
goto out_set_cpu;
}
#endif
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/