Commits
Konstantin Khorenko authored and Pavel Emelianov committed d5ac29c5dd9
[STOPMACHINE] Fix possible live-lock problem found by Vasily (vvs@) & Kirill (dev@): a possible situation in stop_machine: - stopmachine_state == STOPMACHINE_WAIT; - STOPPER (stop_machine()) is in state SM_STOPPER_WAITING, calling yield() in a loop; - SLAVES (stopmachine()) also call yield() in a loop. This leads to the fairsched_lock suffering on all CPUs and in case of unfair getting lock rules (for example on NUMA node), some CPUs can wait for the lock forever/for a long time, causing a hang of the node. This patch replaces yield() by msleep(10). Mainstream kernel is affected as well, though it is harder to trigger: One CPU does yield() taking/releasing rq->lock, while another CPU should try to take that rq->lock (e.g. for balancing) and will livelock forever.