I had the same question, or maybe even a more basic one: what do they mean by "unmapped I/O", and is there a different term for this concept in Linux? Does it perhaps relate to O_DIRECT? To sendfile() and splice()? This paper is the closest to an answer that I've found: http://www.cs.technion.ac.il/~dan/papers/cim-asplos-2016.pdf
I think the point is that, currently, BSD (at least with Hyper-V) defaults to a "mapped" zero-copy approach: when a read is requested, the user space buffer is mapped to a DMA accessible address, the device DMA's the data directly into the buffer, and then the DMA address is unmapped.
Unfortunately, the IOMMU operations to make this happen are not free, and have side-effects like a TLB flush. For small transfers, it's cheaper to let the DMA write to a persistent kernel buffer, and then have the kernel copy it to user-space. I think this traditional non-zero-copy approach is what they are referring to as "unmapped".
But I'm guessing. It would be kind if someone fluent in BSD could explain it correctly.
Comments
I had the same question, or maybe even a more basic one: what do they mean by "unmapped I/O", and is there a different term for this concept in Linux? Does it perhaps relate to O_DIRECT? To sendfile() and splice()? This paper is the closest to an answer that I've found: http://www.cs.technion.ac.il/~dan/papers/cim-asplos-2016.pdf
I think the point is that, currently, BSD (at least with Hyper-V) defaults to a "mapped" zero-copy approach: when a read is requested, the user space buffer is mapped to a DMA accessible address, the device DMA's the data directly into the buffer, and then the DMA address is unmapped.
Unfortunately, the IOMMU operations to make this happen are not free, and have side-effects like a TLB flush. For small transfers, it's cheaper to let the DMA write to a persistent kernel buffer, and then have the kernel copy it to user-space. I think this traditional non-zero-copy approach is what they are referring to as "unmapped".
But I'm guessing. It would be kind if someone fluent in BSD could explain it correctly.