On Tue, Apr 03, 2007 at 10:48:20PM +0530, Srivatsa Vaddagiri wrote:
I wonder if there is some value in "enforcing" an order in which
processes get frozen i.e freeze A first before B. That may solve the
deadlocks we have been discussing wrt kthread_stop and flush_workqueue
as well.
The idea is similar to how deadlock wrt multiple locks are solved -
where a ordering is enforced. Take Lock A first before Lock B.
If process A waits on B (like in kthread_stop or flush_workqueue), then if we:
1. Insert A and B in a list (freeze_me_first_list)
2. Have freezer scan freeze_me_first_list before the master
task-list, so that it:
2a. "freezes A and waits for A to get frozen" first
2b. "freezes B and waits for B to get frozen" next
then we would avoid the nastiness of "B getting frozen first and A doesnt
freeze because of that" with lesser code changes?
--
Regards,
vatsa
-