qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH] raw/linux-aio: Also initialize POSIX AIO


From: Kevin Wolf
Subject: [Qemu-devel] Re: [PATCH] raw/linux-aio: Also initialize POSIX AIO
Date: Tue, 20 Oct 2009 12:12:55 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Thunderbird/3.0b3

Am 20.10.2009 11:33, schrieb Kevin Wolf:
> When using Linux AIO raw still falls back to POSIX AIO sometimes, so we should
> initialize it.
> 
> Not initializing it happens to work if POSIX AIO is used by another drive, or
> if the format is not specified (probing the format uses POSIX AIO) or by pure
> luck (e.g. it doesn't seem to happen any more with qcow2 since we have 
> re-added
> synchronous qcow2 functions).

On that note, falling back to POSIX AIO means that paio_submit is called
with a Linux AIO aio_ctx. Which works because this parameter is unused
anyway, but am I the only one to find this ugly?

What is the public interface of paio_submit meant to look like at all?
If aio_ctx is guaranteed to be unused, why not drop it or pass NULL at
least? And if it could be used some time in the future, the raw block
driver needs to be fixed.

That said, I don't even think that the raw block driver is the right
place to distinguish between different AIO variants. Having a generic
aio_submit that calls the right AIO driver depending on the context
would be much cleaner. This would also mean that laio_submit handles the
fallback to paio_submit on its own, which I think is much cleaner than
teaching raw about the capabilities of each driver.

Does this make sense or is there this little detail that is too easy to
miss?

Kevin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]