7 ms·
The author states: >"Virtual memory is continuous as seen from a process’ point-of-view thanks to page tables and the memory management unit (MMU). However, it
by bogomipz 7y ago
The author states:
>"Virtual memory is continuous as seen from a process’ point-of-view thanks to page tables and the memory management unit (MMU). However, it’s non-continuous as seen from the device point-of-view, because there is no MMU between the PCIe bus and the memory controller (well, some CPUs have an IO-MMU but let’s keep things simple). Hence, in a single DMA transfer only one page could be copied at a time. To overcome this limitation OS usually provide a scatter/gather API. Such an API chains together multiple page-sized memory transfers by creating a list of addresses of pages to be transferred."
So a DMA controller accesses physical memory pages and not virtual memory pages? Is there a reason why it doesn't go through the MMU like everything else? Is this something historical?
If a IO-MMU is present would there be an reason to use a scatter/gather API?
- dooglius 7y agoIt would be expensive as the DMA's MMU would now have to maintain a large TLB to be performant, and there would be a startup overhead as new page information is loaded.