On 09/19/2011 05:11 PM, Kevin Wolf wrote:
>  I think it is possible to go a step further, turn
>  posix_aio_process_queue into a bottom half and get rid of the pipe
>  altogether.  This in turn would remove the only real user of
>  io_process_queue in qemu_aio_set_fd_handler.  However, this is already a
>  nice improvement.
But without the fd, wouldn't the I/O thread possibly wait for much
longer until its select() times out and it starts processing BHs?

Hmm, in qemu_aio_wait yes... In the normal qemu event loop, however, bottom halves exit the select loop with qemu_notify_event(). qemu currently has a 1-second timeout for the select, but it should work just as well with an infinite timeout. If it doesn't, it's a bug.

It should be possible to turn posix_aio_process_queue into a bottom half, but the pipe is still necessary in order to exit the qemu_aio_wait select loop and schedule the bottom half.

Paolo

Reply via email to