Re: [RFC] vfio iommu type1: improve memory pinning process for raw PFN mapping

2018-02-26 Thread Jason Cai (Xiang Feng)
On 27 Feb 2018, at 3:19 AM, Alex Williamson wrote: > On Sat, 24 Feb 2018 13:44:07 +0800 > jason wrote: > >> When using vfio to pass through a PCIe device (e.g. a GPU card) that >> has a huge BAR (e.g. 16GB), a lot of cycles are wasted on memory >> pinning because PFNs of PCI BAR are not backed

Re: [RFC] vfio iommu type1: improve memory pinning process for raw PFN mapping

2018-02-26 Thread Alex Williamson
On Sat, 24 Feb 2018 13:44:07 +0800 jason wrote: > When using vfio to pass through a PCIe device (e.g. a GPU card) that > has a huge BAR (e.g. 16GB), a lot of cycles are wasted on memory > pinning because PFNs of PCI BAR are not backed by struct page, and > the corresponding VMA has flags VM_IO|VM

[RFC] vfio iommu type1: improve memory pinning process for raw PFN mapping

2018-02-23 Thread jason
When using vfio to pass through a PCIe device (e.g. a GPU card) that has a huge BAR (e.g. 16GB), a lot of cycles are wasted on memory pinning because PFNs of PCI BAR are not backed by struct page, and the corresponding VMA has flags VM_IO|VM_PFNMAP. With this change, memory pinning process will fi