|
From: | Anthony Liguori |
Subject: | [Qemu-devel] Re: [PATCH][RFC] Refactor AIO to allow multiple AIO implementations |
Date: | Thu, 11 Sep 2008 07:45:54 -0500 |
User-agent: | Thunderbird 2.0.0.16 (X11/20080723) |
Gerd Hoffmann wrote:
Anthony Liguori wrote:This patch refactors the AIO layer to allow multiple AIO implementations. It'sonly possible because of the recent signalfd() patch.Right now, the AIO infrastructure is pretty specific to the block raw backend. For other block devices to implement AIO, the qemu_aio_wait function must support registration. This patch introduces a new function, qmeu_aio_set_fd_handler, which can be used to register a file descriptor to be called back. qemu_aio_wait() now polls a set of file descriptors registered with this function until one becomes readable or writable.Hmm, what is the long-term plan for this?
Step one is to move the generic aio bits out of block-raw-posix (which this patch does).
Step two is to move the posix-aio routines out of block-raw-posix.Step three would be to add a generic interface to allow block-raw-posix to use multiple aio implementations
Step four would be to add a new aio implementation (I think the best route is a thread-pool based implementation).
Regards, Anthony Liguori
Separating out the completion notification is a nice first step. Most of the aio infrastructure is still in the block raw backend though. IMHO it doesn't belong there. The aio implementation(s) should be a separate entity usable by all block backends to invoke aio requests, without having to care about how this is actually implemented (threads, linux aio, posix aio, whatever). cheers, Gerd
[Prev in Thread] | Current Thread | [Next in Thread] |