[Qemu-devel] [PATCH 1/2] AioContext: fix broken placement of event_notifier_test_and_clear

2015-07-18 Thread Paolo Bonzini
event_notifier_test_and_clear must be called before processing events. Otherwise, an aio_poll could "eat" the notification before the main I/O thread invokes ppoll(). The main I/O thread then never wakes up. This is an example of what could happen: i/o thread vcpu thread

Re: [Qemu-devel] [PATCH 1/2] AioContext: fix broken placement of event_notifier_test_and_clear

2015-07-19 Thread Fam Zheng
On Sat, 07/18 22:21, Paolo Bonzini wrote: > event_notifier_test_and_clear must be called before processing events. > Otherwise, an aio_poll could "eat" the notification before the main > I/O thread invokes ppoll(). The main I/O thread then never wakes up. > This is an example of what could happen:

Re: [Qemu-devel] [PATCH 1/2] AioContext: fix broken placement of event_notifier_test_and_clear

2015-07-19 Thread Paolo Bonzini
On 20/07/2015 05:55, Fam Zheng wrote: > On Sat, 07/18 22:21, Paolo Bonzini wrote: >> event_notifier_test_and_clear must be called before processing events. >> Otherwise, an aio_poll could "eat" the notification before the main >> I/O thread invokes ppoll(). The main I/O thread then never wakes u