Introduce vfio_dma_mapping_perf_test
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest5 patches 0 repliesNew
- v34 patches 4 repliesSuperseded
- v24 patches 5 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 4 patches | 7 replies | Superseded |
Changes in v4 from the cover letter
- Split kselftest_harness.h custom CLI option support into its own patch
- Printed usage help on invalid options and passed custom optstring to test_enabled()
- Skipped variants when the '-b' size is not aligned to the page size
- Renamed timer_start() to timer_get()
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | vfio: selftests: Assert the region was unmapped in iommu_unmap()tools/ tools/ | +6 | 0 replies | |
| 2/5 | vfio: selftests: Introduce vfio_dma_mapping_perf_testtools/ tools/ tools/ | +122 | 0 replies | |
| 3/5 | vfio: selftests: Add memfd test to vfio_dma_mapping_perf_testtools/ tools/ tools/ | +132 | 0 replies | |
| 4/5 | selftests: harness: Support custom command-line optionstools/ | +94 | 0 replies | |
| 5/5 | vfio: selftests: Allow a size for vfio_dma_mapping_perf_testtools/ | +117 | 0 replies |
Reviews trailers per patch
3 of 5 patches have a Reviewed-by or Acked-by.
| Patch | David Matlack |
|---|---|
| 1/5 | R-b |
| 2/5 | R-b |
| 3/5 | R-b |
| 4/5 | |
| 5/5 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 0/5] Introduce vfio_dma_mapping_perf_test
Add a new VFIO selftest, vfio_dma_mapping_perf_test, to provide a configurable tool for measuring DMA mapping and unmapping latencies across backing memory types, IOMMU backends, and region sizes.
For example, running the test across various region sizes (backed by 1G HugeTLB pages) makes it easy to collect and compare latencies:
Map latency:
IOCTL | 1G | 4G | 32G | 128G
--------------------+----------+----------+----------+-----------
VFIO_IOMMU_MAP_DMA | 0.39 ms | 1.38 ms | 11.62 ms | 46.54 ms IOMMU_IOAS_MAP | 0.58 ms | 2.27 ms | 18.08 ms | 73.49 ms IOMMU_IOAS_MAP_FILE | 0.01 ms | 0.02 ms | 0.10 ms | 0.32 ms
Unmap latency:
IOCTL | 1G | 4G | 32G | 128G
--------------------+----------+----------+----------+-----------
VFIO_IOMMU_MAP_DMA | 1.51 ms | 5.69 ms | 45.78 ms | 187.66 ms IOMMU_IOAS_MAP | 1.84 ms | 6.83 ms | 52.53 ms | 211.75 ms IOMMU_IOAS_MAP_FILE | 1.78 ms | 6.74 ms | 61.26 ms | 213.70 ms
The numbers in the tables were collected on EMR.
Changes in v4:
- Split kselftest_harness.h custom CLI option support into its own patch
- Printed usage help on invalid options and passed custom optstring to test_enabled()
- Skipped variants when the '-b' size is not aligned to the page size
- Renamed timer_start() to timer_get()
v3: https://lore.kernel.org/kvm/[email protected]/
Aaron Lewis (5):
vfio: selftests: Assert the region was unmapped in iommu_unmap()
vfio: selftests: Introduce vfio_dma_mapping_perf_test
vfio: selftests: Add memfd test to vfio_dma_mapping_perf_test
selftests: harness: Support custom command-line options
vfio: selftests: Allow a size for vfio_dma_mapping_perf_test
tools/testing/selftests/kselftest_harness.h | 127 +++++--- tools/testing/selftests/vfio/Makefile | 1 + .../selftests/vfio/lib/include/libvfio.h | 31 ++ .../vfio/lib/include/libvfio/iommu.h | 14 +- tools/testing/selftests/vfio/lib/iommu.c | 24 ++ .../vfio/vfio_dma_mapping_perf_test.c | 279 ++++++++++++++++++ .../selftests/vfio/vfio_dma_mapping_test.c | 11 +- 7 files changed, 444 insertions(+), 43 deletions(-) create mode 100644 tools/testing/selftests/vfio/vfio_dma_mapping_perf_test.c
Signature · 1 line
2.56.0.611.g1030f0b940-goog