summaryrefslogtreecommitdiffstats
path: root/drivers/vfio/pci
diff options
context:
space:
mode:
authorJason Cai (Xiang Feng) <jason.cai@linux.alibaba.com>2018-03-22 12:52:16 +0800
committerAlex Williamson <alex.williamson@redhat.com>2018-03-22 13:18:27 -0600
commit356e88ebe4473a3663cf3d14727ce293a4526d34 (patch)
treee261e27c7ed605750677e610ae7d66dec2d1157c /drivers/vfio/pci
parentc9f89c3f87cfc026d88c08054710902dd52a7772 (diff)
downloadlinux-356e88ebe4473a3663cf3d14727ce293a4526d34.tar.bz2
vfio/type1: Improve memory pinning process for raw PFN mapping
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 flag VM_PFNMAP. With this change, when pinning a region which is a raw PFN mapping, it can skip unnecessary user memory pinning process, and thus, can significantly improve VM's boot up time when passing through devices via VFIO. In my test on a Xeon E5 2.6GHz, the time mapping a 16GB BAR was reduced from about 0.4s to 1.5us. Signed-off-by: Jason Cai (Xiang Feng) <jason.cai@linux.alibaba.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/vfio/pci')
0 files changed, 0 insertions, 0 deletions