Re: New NUMA scheduler and hotplug CPU

From: Rusty Russell
Date: Tue Jan 27 2004 - 20:02:02 EST


In message <368660000.1075217230@[10.10.2.4]> you write:
> > Yeah, I talked it over with Rusty some on IRC. I have more of a feeling
> > why he's trying to do it that way now.
>
> BTW, Rusty - what are the locking rules for cpu_online_map under hotplug?
> Is it RCU or something? The sched domains usage of it doesn't seem to take
> any locks.

The trivial usage is to take the cpucontrol sem (down_cpucontrol()).
There's a grace period between taking the cpu offline and actually
killing it too, so for most usages RCU is sufficient.

Fortunately, I've yet to hit a case where this isn't sufficient. For
the scheduler there's an explicit "move all tasks off the CPU" call
which takes the tasklist lock and walks the tasks.

Cheers,
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/