|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [PATCH v2] block: avoid SIGUSR2 |
Date: | Mon, 19 Sep 2011 17:25:38 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:6.0.2) Gecko/20110906 Thunderbird/6.0.2 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |