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

Reply via email to