On Wed, May 23, 2012 at 2:31 AM, Michael Tokarev <m...@tls.msk.ru> wrote:
> On 22.05.2012 14:03, ronnie sahlberg wrote:
> []
>>>> Doh, now I remember.  Whenever you change the aio handlers you need to
>>>> call qemu_notify_event() afterwards, if the handler may fire right away.
>>>
>>> Thanks.  I just confirmed that qemu_notify_event() fixes the issue.
>>> Ill send a patch that uses qemu_notify_event() and a comment why this is 
>>> needed.
>
> When I were writing network block driver I tried to not call 
> qemu_aio_set_fd_handler()
> unless absolutely necessary -- that is, trying to write as much as possible 
> till
> the next write returns EAGAIN, or to read till the next read returns EAGAIN.  
> This
> way there's no need to call qemu_notify_event().  FWIW.
>

Good idea. Ill create a patch that keeps track of which events we are
listening on already and only calling these functions when the events
change.

regards
ronnie sahlberg

Reply via email to