On Wed, Nov 12, 2025 at 07:22:14PM +0000, David Matlack wrote:
This series adds support for tests that use multiple devices, and adds one new test, vfio_pci_device_init_perf_test, which measures parallel device initialization time to demonstrate the improvement from commit e908f58b6beb ("vfio/pci: Separate SR-IOV VF dev_set").
The new test runs and passes for me.
Tested-by: Alex Mastro amastro@fb.com
$ vfio_pci_device_init_perf_test $(readlink -f /sys/class/vfio-dev/*/../.. | xargs -n1 basename) Testing parallel initialization of 24 devices: 0000:05:00.0 0000:06:00.0 0000:27:00.0 0000:28:00.0 0000:e5:00.0 0000:e6:00.0 0000:e7:00.0 0000:e8:00.0 0000:e9:00.0 0000:ea:00.0 0000:c5:00.0 0000:c6:00.0 0000:07:00.0 0000:c7:00.0 0000:c8:00.0 0000:c9:00.0 0000:ca:00.0 0000:08:00.0 0000:09:00.0 0000:0a:00.0 0000:23:00.0 0000:24:00.0 0000:25:00.0 0000:26:00.0 TAP version 13 1..5 # Starting 5 tests from 5 test cases. # RUN vfio_pci_device_init_perf_test.vfio_type1_iommu.init ... Wall time: 1.440004083s Min init time (per device): 1.236283226s Max init time (per device): 1.440002010s Avg init time (per device): 1.258762246s # OK vfio_pci_device_init_perf_test.vfio_type1_iommu.init ok 1 vfio_pci_device_init_perf_test.vfio_type1_iommu.init # RUN vfio_pci_device_init_perf_test.vfio_type1v2_iommu.init ... Wall time: 1.448952696s Min init time (per device): 1.242623358s Max init time (per device): 1.448951915s Avg init time (per device): 1.264836317s # OK vfio_pci_device_init_perf_test.vfio_type1v2_iommu.init ok 2 vfio_pci_device_init_perf_test.vfio_type1v2_iommu.init # RUN vfio_pci_device_init_perf_test.iommufd_compat_type1.init ... Wall time: 1.446931666s Min init time (per device): 1.242316634s Max init time (per device): 1.446927360s Avg init time (per device): 1.264904097s # OK vfio_pci_device_init_perf_test.iommufd_compat_type1.init ok 3 vfio_pci_device_init_perf_test.iommufd_compat_type1.init # RUN vfio_pci_device_init_perf_test.iommufd_compat_type1v2.init ... Wall time: 1.449211729s Min init time (per device): 1.243377853s Max init time (per device): 1.449211729s Avg init time (per device): 1.264266785s # OK vfio_pci_device_init_perf_test.iommufd_compat_type1v2.init ok 4 vfio_pci_device_init_perf_test.iommufd_compat_type1v2.init # RUN vfio_pci_device_init_perf_test.iommufd.init ... Wall time: 1.447583702s Min init time (per device): 1.241216318s Max init time (per device): 1.447582350s Avg init time (per device): 1.264159293s # OK vfio_pci_device_init_perf_test.iommufd.init ok 5 vfio_pci_device_init_perf_test.iommufd.init # PASSED: 5 / 5 tests passed. # Totals: pass:5 fail:0 xfail:0 xpass:0 skip:0 error:0