While we are at this per-subsystem cpuhotplug "locking", here's a
proposal that might put an end to the workqueue deadlock woes.
I'm yet to cook up a patch for this, but here's the idea in brief.
On Wed, Dec 20, 2006 at 11:23:50PM -0800, Andrew Morton wrote:
> to the relay driver. Why do that - you don't own cpu_online_map (but you
> do get some notifications when it wants to change, that's all).
How about: Let each hot-cpu-aware subsystem maintain it's own
online_cpus mask. Thus we can eliminate the global online_cpus mask
and also have a clear picture of what data the per-subsystem mutexes
are protecting :)
Ditto for _cpu_up().
This will not only reduce the lock-contention , but will also
allow the pre/post hotplug notifications handlers to make calls to
function which are cpu-hotplug-aware (like create_workqueue,
destroy_workqueues etc) without ending up in a recursive deadlock
as the persubsystem mutexes would have been released by then.
And since we are sending notifications to update
per_subsystem_cpus_mask before sending the
post_cpu_hotplug_notifications, the post_notification handlers
will be executing with the consistent value of the online_cpus mask.
Does anybody see a problem with this "update_now-cleanup_later"
Thanks and Regards
Gautham R Shenoy
Linux Technology Center
"Freedom comes with a price tag of responsibility, which is still a bargain,
because Freedom is priceless!"
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Video 4 Linux]
[Linux for the blind]