diff options
author | Peter Zijlstra <[email protected]> | 2013-10-07 11:29:15 +0100 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2013-10-09 12:40:45 +0200 |
commit | 1be0bd77c5dd7c903f46abf52f9a3650face3c1d (patch) | |
tree | e8b2a6c742951e8a9f98a53a285ab85b79437e4d /net/lapb/lapb_iface.c | |
parent | 25cbbef1924299249756bc4030fcb2436c019813 (diff) |
stop_machine: Introduce stop_two_cpus()
Introduce stop_two_cpus() in order to allow controlled swapping of two
tasks. It repurposes the stop_machine() state machine but only stops
the two cpus which we can do with on-stack structures and avoid
machine wide synchronization issues.
The ordering of CPUs is important to avoid deadlocks. If unordered then
two cpus calling stop_two_cpus on each other simultaneously would attempt
to queue in the opposite order on each CPU causing an AB-BA style deadlock.
By always having the lowest number CPU doing the queueing of works, we can
guarantee that works are always queued in the same order, and deadlocks
are avoided.
Signed-off-by: Peter Zijlstra <[email protected]>
[ Implemented deadlock avoidance. ]
Signed-off-by: Rik van Riel <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Srikar Dronamraju <[email protected]>
Signed-off-by: Mel Gorman <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'net/lapb/lapb_iface.c')
0 files changed, 0 insertions, 0 deletions