Bug 3955 - 【5.10】vfio Batch page pinning改善设备透传虚拟机启动时间
Summary: 【5.10】vfio Batch page pinning改善设备透传虚拟机启动时间
Status: RESOLVED FIXED
Alias: None
Product: ANCK 5.10 Dev
Classification: ANCK
Component: drivers (show other bugs) drivers
Version: 5.10.y-13
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: GuixinLiu
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-06 20:17 UTC by cuishw
Modified: 2023-02-28 19:36 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cuishw inspur_group 2023-02-06 20:17:33 UTC
Description of problem:

vfio在执行vfio_pin_map_dma时会将物理地址连续的内存执行iommu map,这时每次只pin一个page,然后判断和上一个page是否物理连续,这种操作导致vfio_pin_map_dma执行时间变长。
这样会导致设备透传的虚拟机启动时间变长,如果改为每次pin多个page,然后分批将这些page中物理连续的部分执行iommu map将会对降低启动时间。
upstream commit 4d83de6da265cd84e74c19d876055fa5f261cde4可以改善这个问题,根据commit log将由8%左右的性能提升。
Comment 1 maqiao alibaba_cloud_group 2023-02-28 19:36:42 UTC
merged: https://gitee.com/anolis/cloud-kernel/pulls/1137