From: David Laight <David.Laight@xxxxxxxxxx> Date: Tue, 14 Feb 2017 17:17:22 +0000 > From: David Miller >> Sent: 14 February 2017 17:04 > ... >> One path I see around all of this is full integration. Meaning that >> we can free pages into the page allocator which are still DMA mapped. >> And future allocations from that device are prioritized to take still >> DMA mapped objects. > ... > > For systems with 'expensive' iommu has anyone tried separating the > allocation of iommu resource (eg page table slots) from their > assignment to physical pages? > > Provided the page sizes all match, setting up a receive buffer might > be as simple as writing the physical address into the iommu slot > that matches the ring entry. > > Or am I thinking about hardware that is much simpler than real life? You still will eat an expensive MMIO or hypervisor call to setup the mapping. IOMMU is expensive because of two operations, the slot allocation (which takes locks) and the modification of the IOMMU PTE to setup or teardown the mapping. This is why attempts to preallocate slots (which people have looked into) never really takes off. You really have to eliminate the entire operation to get worthwhile gains. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>