[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] honor IDE_DMA_BUF_SECTORS
From: |
Stefano Stabellini |
Subject: |
Re: [Qemu-devel] [PATCH] honor IDE_DMA_BUF_SECTORS |
Date: |
Thu, 26 Mar 2009 10:31:57 +0000 |
User-agent: |
Thunderbird 2.0.0.14 (X11/20080505) |
Avi Kivity wrote:
> Stefano Stabellini wrote:
>> I checked the ide driver in the kernel and it assumes that the max
>> sectors is either 256 or 64K depending on lba support, exactly as qemu does.
>>
>>
>> So now my question is: if I want to reduce the maximum dma request size
>> inside qemu, given that I must fill correctly the guest provided sg
>> list, is it OK to use IDE_DMA_BUF_SECTORS in dma_buf_prepare as I have
>> done in my patch?
>>
>> I don't see any other possible solution, but if you have any other
>> suggestion you are welcome to let me know.
>>
>
> Look at the DMA API (dma-helpers.c) which already knows how to split
> large dma requests. Splitting is controlled by
> cpu_physical_memory_map() (which I'm guessing is your real limitation),
> so you might want to look at that.
>
> The advantage of this approach is that it will apply to scsi and virtio
> once they are ported to use the DMA API.
>
>
Unfortunately that is not really helpful: after the split done by
cpu_physical_memory_map the iovector is converted in a buffer in
bdrv_aio_rw_vector and then the full length of the buffer is passed on
to the bdrv_aio_write\read for the dma operation.
I need a way to set a maximum limit for the total number of sectors in
the dma operation, much like blk_queue_max_phys_segments in the kernel.
This could also be useful to make sure that we don't allocate bounce
buffers bigger than a predetermined limit.
- [Qemu-devel] [PATCH] honor IDE_DMA_BUF_SECTORS, Stefano Stabellini, 2009/03/25
- Re: [Qemu-devel] [PATCH] honor IDE_DMA_BUF_SECTORS, Avi Kivity, 2009/03/25
- Re: [Qemu-devel] [PATCH] honor IDE_DMA_BUF_SECTORS, Stefano Stabellini, 2009/03/25
- Re: [Qemu-devel] [PATCH] honor IDE_DMA_BUF_SECTORS, Avi Kivity, 2009/03/25
- Re: [Qemu-devel] [PATCH] honor IDE_DMA_BUF_SECTORS, Stefano Stabellini, 2009/03/25
- Re: [Qemu-devel] [PATCH] honor IDE_DMA_BUF_SECTORS, Stefano Stabellini, 2009/03/25
- Re: [Qemu-devel] [PATCH] honor IDE_DMA_BUF_SECTORS, Avi Kivity, 2009/03/26
- Re: [Qemu-devel] [PATCH] honor IDE_DMA_BUF_SECTORS,
Stefano Stabellini <=
- Re: [Qemu-devel] [PATCH] honor IDE_DMA_BUF_SECTORS, Avi Kivity, 2009/03/26
- Re: [Qemu-devel] [PATCH] honor IDE_DMA_BUF_SECTORS, Stefano Stabellini, 2009/03/26
- Re: [Qemu-devel] [PATCH] honor IDE_DMA_BUF_SECTORS, Avi Kivity, 2009/03/26
- Re: [Qemu-devel] [PATCH] honor IDE_DMA_BUF_SECTORS, Stefano Stabellini, 2009/03/26
- Re: [Qemu-devel] [PATCH] honor IDE_DMA_BUF_SECTORS, Samuel Thibault, 2009/03/26
- Re: [Qemu-devel] [PATCH] honor IDE_DMA_BUF_SECTORS, Avi Kivity, 2009/03/26
- Re: [Qemu-devel] [PATCH] honor IDE_DMA_BUF_SECTORS, Samuel Thibault, 2009/03/26
- Re: [Qemu-devel] [PATCH] honor IDE_DMA_BUF_SECTORS, Avi Kivity, 2009/03/26
- Re: [Qemu-devel] [PATCH] honor IDE_DMA_BUF_SECTORS, Samuel Thibault, 2009/03/26
- Re: [Qemu-devel] [PATCH] honor IDE_DMA_BUF_SECTORS, Avi Kivity, 2009/03/26