Bug 3960 - 【4.19】vfio Batch page pinning改善设备透传虚拟机启动时间
Summary: 【4.19】vfio Batch page pinning改善设备透传虚拟机启动时间
Status: NEW
Alias: None
Product: ANCK 4.19 Dev
Classification: ANCK
Component: drivers (show other bugs) drivers
Version: 4.19-026.x
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: GuixinLiu
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-07 08:24 UTC by cuishw
Modified: 2023-02-07 08:24 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-07 08:24:10 UTC
Description of problem:

vfio在执行vfio_pin_map_dma时会将物理地址连续的内存执行iommu map,这时每次只pin一个page,然后判断和上一个page是否物理连续,这样会导致vfio_pin_map_dma执行时间变长。
设备透传的虚拟机使用vfio时将导致启动时间变长,如果改为每次pin多个page,然后分批将这些page中物理连续的部分执行iommu map将会对启动时间有所改善。
upstream commit 4d83de6da265cd84e74c19d876055fa5f261cde4可以优化这个问题,根据commit log将有8%左右的性能提升。