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

2018-03-21 Thread Jason Cai (Xiang Feng)
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

[PATCH] dm thin: add sanity checks on creating thin-pool and external snapshot

2019-01-20 Thread Jason Cai (Xiang Feng)
l+0x60/0x90 ? ksys_write+0x4f/0xb0 __x64_sys_ioctl+0x16/0x20 do_syscall_64+0x55/0x150 entry_SYSCALL_64_after_hwframe+0x44/0xa9 ``` Signed-off-by: Jason Cai (Xiang Feng) --- drivers/md/dm-thin.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/md/dm-thin.c b/drivers/

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

2018-03-03 Thread Jason Cai (Xiang Feng)
PFN mapping, it can skip unnecessary user memory pinning process. Thus, it can significantly improve VM's boot up time when passing through devices via VFIO. Signed-off-by: Jason Cai (Xiang Feng) --- drivers/vfio/vfio_iommu_type1.c | 24 ++-- 1 file changed, 14 inser

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

2018-03-18 Thread Jason Cai (Xiang Feng)
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

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

2018-02-26 Thread Jason Cai (Xiang Feng)
>mm->locked_vm + lock_acct + 1 > limit) { > put_pfn(pfn, dma->prot); > @@ -461,10 +468,8 @@ static long vfio_pin_pages_remote(struct vfio_dma *dma, > unsigned long vaddr, > > unpin_out: > if (ret) { > - if (!rsvd) {