3 ms·
I have to say after looking at various DMA hardware I much much prefer the scatter gather list type than the ring type of DMA. The entire need of a bipbuffer a
by bfrog 3y ago
I have to say after looking at various DMA hardware I much much prefer the scatter gather list type than the ring type of DMA.
The entire need of a bipbuffer allocation for DMA then goes way. You can have a simple pool of fixed sized blocks to throw at the DMA. Pretty easily done with a free list.
I do think the implementation here is cool though, and its nice to see some work in this area.
- 95014_refugee 3y agoTo make scatter/gather go fast, you either spend a lot of effort caching descriptor lists for pinned buffers (because you expect to see them often), or heavily optimising your VM's v2p translation machinery, or some combination of the two. And then you wind up discovering that you the driver writer aren't actually trusted and so you need to insert at least one if not several IOMMUs between the peripheral and the memory(ies) that they may access, managed by another software component in a different address space. Then someone asks you to make all of this work for clients in VMs. At which point you start wondering why you didn't just allocate a physically contiguous buffer at startup and copy to/from your client buffers using the CPU... Sorry for sounding triggered... 8)
- bfrog 3y agoNo need to apologize at all. I haven’t seen these issues. But I’ve worked with this setup without mmu involvement.