[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug 1880355] [NEW] Length restrictions for fw_cfg_dma_transfer?
From: |
Paolo Bonzini |
Subject: |
Re: [Bug 1880355] [NEW] Length restrictions for fw_cfg_dma_transfer? |
Date: |
Mon, 25 May 2020 15:59:00 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 |
On 24/05/20 16:27, Philippe Mathieu-Daudé wrote:
>> In an ideal world all our DMA devices would use some kind of common
>> framework or design pattern so they didn't hog all the CPU
>> and/or spend minutes with the BQL held if the guest requests
>> an enormous-sized DMA. In practice many of them just have
>> a simple "loop until the DMA transfer is complete" implementation...
> Is this framework already implemented in the hidden dma-helpers.c?
>
> Apparently this file was written for BlockBackend, but the code seems
> rather generic.
The code is generic, see dma_buf_rw, but the asynchronous code is
currently used only for block devices. Above a certain limit it would
make sense to reuse them to perform dma_buf_rw in the thread pool.
Paolo