Re: [PATCH 3/4] 2.6.2-rc2-mm2 CPU Hotplug: The Core

From: Rusty Russell
Date: Mon Feb 02 2004 - 06:14:22 EST


In message <Pine.LNX.4.58.0402020353240.25194@xxxxxxxxxxxxxxxxxxxxxxxx> you write:
> the sched.c bits look good. A question: why is the migrate_all_tasks()
> code nonatomic? If you run this code in the context of the migration
> thread of the downed CPU then all of the migration can be done in one big
> atomic locked section which holds all runqueue locks and just moves all
> tasks off the current CPU. If it were done this way then eg. the
> __migrate_task() race-avoidance check (cpu_is_offline()) could go away and
> the whole thing would be more robust i believe.

Hmm...

I can code it up and we can see what it looks like.

Unfortunately the __migrate_task() check won't go away: someone may
have asked to move from CPU 0 to 1, and by the time migration thread
on 0 gets to the request, 1 has gone down. We don't want all the
callers to hold the cpucontrol lock, because now the NUMA scheduler
uses migration as a common case 8(

Thanks,
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
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/