|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [PATCH v2] AioContext: fix broken placement of event_notifier_test_and_clear |
Date: | Mon, 20 Jul 2015 21:50:01 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 |
On 20/07/2015 18:36, Stefan Hajnoczi wrote: >> > >> > i/o thread vcpu thread worker thread >> > --------------------------------------------------------------------- >> > lock_iothread >> > notify_me = 1 >> > ... >> > unlock_iothread >> > lock_iothread >> > notify_me = 3 >> > ppoll >> > notify_me = 1 >> > bh->scheduled = 1 >> > event_notifier_set >> > event_notifier_test_and_clear >> > ppoll >> > *** hang *** > I don't understand this diagram. Why is event_notifier_test_and_clear() > called by the vcpu thread? event_notifier_set() was called *after* vcpu > thread's ppoll() returned so I wouldn't expect the vcpu thread to see > the notify. > > Was there a previous notify pending? Yes, for example a bottom half could have rescheduled itself. Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |