[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 05/10] dma-helpers: add dma_buf_read and dma_buf
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH 05/10] dma-helpers: add dma_buf_read and dma_buf_write |
Date: |
Thu, 11 Aug 2011 17:12:39 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110707 Thunderbird/5.0 |
Am 11.08.2011 17:05, schrieb Paolo Bonzini:
> On 08/11/2011 04:37 PM, Kevin Wolf wrote:
>>> Right, I would rather update BlockDriverCompletionFunc to pass the AIOCB
>>> as a third parameter, and store the residual bytes in the DMAAIOCB (with
>>> a getter that the completion function can use).
>>
>> Isn't the DMAAIOCB already passed as opaque to the callback?
>
> It is passed to the dma_bdrv_cb, but not to the caller-provided
> callback. If the operation completes before dma_bdrv_{read,write}
> returns, the AIOCB is not stored anywhere and the asynchronous callback
> does not have access to it. Usually it does not have anything to do
> with it, but in this case it could get the residual.
>
> Another possibility is always completing DMA in a bottom half. This
> ensures that the callback can access the AIOCB, but it exposes an
> implementation detail to the caller, so I don't like it.
At least in the block layer, AIO callbacks may never be called before
the submission function has returned. I think this makes the DMA helpers
provide the same behaviour.
But I'm not sure if the definition of the AIOCB struct isn't private to
the block layer.
Kevin
- [Qemu-devel] [PATCH 03/10] dma-helpers: rewrite completion/cancellation, (continued)
- [Qemu-devel] [PATCH 03/10] dma-helpers: rewrite completion/cancellation, Paolo Bonzini, 2011/08/04
- [Qemu-devel] [PATCH 02/10] dma-helpers: track position in the QEMUSGList, Paolo Bonzini, 2011/08/04
- [Qemu-devel] [PATCH 04/10] dma-helpers: prepare for adding dma_buf_* functions, Paolo Bonzini, 2011/08/04
- [Qemu-devel] [PATCH 05/10] dma-helpers: add dma_buf_read and dma_buf_write, Paolo Bonzini, 2011/08/04
- Re: [Qemu-devel] [PATCH 05/10] dma-helpers: add dma_buf_read and dma_buf_write, Stefan Hajnoczi, 2011/08/11
- Re: [Qemu-devel] [PATCH 05/10] dma-helpers: add dma_buf_read and dma_buf_write, Paolo Bonzini, 2011/08/11
- Re: [Qemu-devel] [PATCH 05/10] dma-helpers: add dma_buf_read and dma_buf_write, Stefan Hajnoczi, 2011/08/11
- Re: [Qemu-devel] [PATCH 05/10] dma-helpers: add dma_buf_read and dma_buf_write, Paolo Bonzini, 2011/08/11
- Re: [Qemu-devel] [PATCH 05/10] dma-helpers: add dma_buf_read and dma_buf_write, Kevin Wolf, 2011/08/11
- Re: [Qemu-devel] [PATCH 05/10] dma-helpers: add dma_buf_read and dma_buf_write, Paolo Bonzini, 2011/08/11
- Re: [Qemu-devel] [PATCH 05/10] dma-helpers: add dma_buf_read and dma_buf_write,
Kevin Wolf <=
- Re: [Qemu-devel] [PATCH 05/10] dma-helpers: add dma_buf_read and dma_buf_write, Paolo Bonzini, 2011/08/11
- Re: [Qemu-devel] [PATCH 05/10] dma-helpers: add dma_buf_read and dma_buf_write, Stefan Hajnoczi, 2011/08/11
[Qemu-devel] [PATCH 06/10] scsi: pass residual amount to command_complete, Paolo Bonzini, 2011/08/04
[Qemu-devel] [PATCH 07/10] scsi: add scatter/gather functionality, Paolo Bonzini, 2011/08/04
[Qemu-devel] [PATCH 09/10] scsi-disk: lazily allocate bounce buffer, Paolo Bonzini, 2011/08/04
[Qemu-devel] [PATCH 08/10] scsi-disk: commonize iovec creation between reads and writes, Paolo Bonzini, 2011/08/04
[Qemu-devel] [PATCH 10/10] scsi-disk: enable scatter/gather functionality, Paolo Bonzini, 2011/08/04
[Qemu-devel] [PATCH 11/11] sample pvscsi driver with s/g support, Paolo Bonzini, 2011/08/04
Re: [Qemu-devel] [PATCH 00/10] SCSI scatter/gather support, Stefan Hajnoczi, 2011/08/11