qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC] Replace posix-aio with custom thread pool


From: Anthony Liguori
Subject: Re: [Qemu-devel] [RFC] Replace posix-aio with custom thread pool
Date: Fri, 12 Dec 2008 12:17:58 -0600
User-agent: Thunderbird 2.0.0.17 (X11/20080925)

Andrea Arcangeli wrote:
On Fri, Dec 12, 2008 at 11:25:55AM -0600, Anthony Liguori wrote:
Hrm, that's more complex than I was expecting. I was thinking the bdrv aio infrastructure would always take an iovec. Any details about the underlying host's ability to handle the iovec would be insulated.

You can't remove the restart memory-capped mechanism from the dma api,
we've to handle dma to non-ram that potentially requires to copy the
whole buffer so we're forced to have a safe linearization at the dma
api layer. So it's not necessary to reinvent the same
restart-partial-transfer logic in the aio layer too. Just set the
define and teach the aio logic to use pread/pwrite if iovcnt == 1 and
you're done ;).

So what I'm suggesting is simpler than what you were expecting, not
more complex. It would be more complex to replicate the restart-bounce
logic in the aio layer too.

Old drivers using bdrv_aio_read/write will keep working, new drivers
using dma api can also use bdrv_aio_readv/writev and the linearization
will happen inside the dma api if aio misses preadv/pwritev support.

You assume that anything using bdrv_aio_readv/writev will be going through a DMA API. This isn't a safe assumption.

Furthermore, you need some way to communicate the fact that you cannot handle iovcnt > 1 iovecs in a performant/safe way.

Regards,

Anthony Liguori





reply via email to

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