* deadlock between cpu_stopper & native_flush_tlb_others()->smp_call_function_many()
@ 2014-03-03 16:43 Igor Mammedov
2014-03-03 16:45 ` Rik van Riel
0 siblings, 1 reply; 3+ messages in thread
From: Igor Mammedov @ 2014-03-03 16:43 UTC (permalink / raw)
To: linux-kernel; +Cc: prarit, riel, mgorman, peterz, alex.shi, Igor Mammedov, hpa
It looks like I hit a deadlock between smp_call_function_many() and
cpu_stopper threads.
Where smp_call_function_many() on CPU1 called from
native_flush_tlb_others() waits on call to be complete on
CPU2 while CPU2 waits on state synchronization in
multi_cpu_stop() which can't be completed until stop work
queued on CPU1 is completed, which can't be done since CPU1
is busy looping in smp_call_function_many().
CPU1 CPU2
stop_machine()
queue stop work on cpu 1&2
native_flush_tlb_others()
smp_call_function_many()
...
---------------------------------------------------------
cpu_stopper_thread()
multi_cpu_stop()
do {
...
msdata->state == MULTI_STOP_PREPARE
msdata->active_cpus == 0110
msdata->thread_ack == 1
} while (curstate != MULTI_STOP_EXIT)
waiting until CPU1 ACKs state, i.e. thread_ack == 0
---------------------------------------------------------
...
if (wait) {
for_cpu(0110) {
csd_lock_wait(csd);
waiting until call on CPU2 is completed
Are there any suggestions on how to fix this nicely?
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: deadlock between cpu_stopper & native_flush_tlb_others()->smp_call_function_many() 2014-03-03 16:43 deadlock between cpu_stopper & native_flush_tlb_others()->smp_call_function_many() Igor Mammedov @ 2014-03-03 16:45 ` Rik van Riel 2014-03-05 16:49 ` Igor Mammedov 0 siblings, 1 reply; 3+ messages in thread From: Rik van Riel @ 2014-03-03 16:45 UTC (permalink / raw) To: Igor Mammedov, linux-kernel; +Cc: prarit, mgorman, peterz, alex.shi, hpa On 03/03/2014 11:43 AM, Igor Mammedov wrote: > It looks like I hit a deadlock between smp_call_function_many() and > cpu_stopper threads. > Are there any suggestions on how to fix this nicely? This patch should fix it: https://lkml.org/lkml/2014/2/28/194 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: deadlock between cpu_stopper & native_flush_tlb_others()->smp_call_function_many() 2014-03-03 16:45 ` Rik van Riel @ 2014-03-05 16:49 ` Igor Mammedov 0 siblings, 0 replies; 3+ messages in thread From: Igor Mammedov @ 2014-03-05 16:49 UTC (permalink / raw) To: Rik van Riel; +Cc: linux-kernel, prarit, mgorman, peterz, alex.shi, hpa On Mon, 03 Mar 2014 11:45:04 -0500 Rik van Riel <riel@redhat.com> wrote: > On 03/03/2014 11:43 AM, Igor Mammedov wrote: > > It looks like I hit a deadlock between smp_call_function_many() and > > cpu_stopper threads. > > > Are there any suggestions on how to fix this nicely? > > This patch should fix it: > > https://lkml.org/lkml/2014/2/28/194 I've just tried it and it doesn't fix issue. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-03-05 16:50 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-03-03 16:43 deadlock between cpu_stopper & native_flush_tlb_others()->smp_call_function_many() Igor Mammedov 2014-03-03 16:45 ` Rik van Riel 2014-03-05 16:49 ` Igor Mammedov
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.