From: David Matlack <dmatlack@google.com>
To: Aaron Lewis <aaronlewis@google.com>
Cc: kvm@vger.kernel.org, alex@shazbot.org, jgg@nvidia.com
Subject: Re: [PATCH v3 0/4] Introduce vfio_dma_mapping_perf_test
Date: Thu, 8 Oct 2026 10:30:40 +0000 [thread overview]
Message-ID: <asdw0Mep7etyQvrE@google.com> (raw)
In-Reply-To: <20260910153326.3085937-1-aaronlewis@google.com>
On 2026-09-10 03:33 PM, Aaron Lewis wrote:
> Add a new VFIO selftest, vfio_dma_mapping_perf_test, to provide a
> configurable tool for measuring DMA mapping and unmapping latencies.
>
> This selftest introduces command-line parameters to provide a convenient
> way to tune the test for specific situations. For example, it can be used
> to observe the lengthy unmap times of the Type 1 IOMMU on large memory
> regions, or to compare DMA mapping performance between the Type 1 IOMMU
> and IOMMUFD. These scenarios can now be easily configured and run via the
> command line.
>
> Changes in v3:
> - Replaced raw printf() calls with ksft_print_msg()
> - Updated the TIME macro to preserve errno
> - Added 'fd' and 'fd_offset' to struct dma_region
> - Simplified teardown_memfd() by removing redundant error checks
> - Replaced the command-line argument passthrough (-a "...") approach with
> first-class support in kselftest_harness.h
This looks a lot better, thanks for making the change!
> - Added collision validation in optstring_append_custom() to prevent custom
> options from overlapping with built-in harness options.
> - Switched test_enabled() to match exact option characters rather than
> tolower(opt), ensuring custom options that differ only by case (such as
> 'R') do not mistakenly match built-in single-case options like '-r'.
>
> Aaron Lewis (4):
> 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
> vfio: selftests: Allow a size for vfio_dma_mapping_perf_test
>
> tools/testing/selftests/kselftest_harness.h | 86 +++++-
> 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 | 263 ++++++++++++++++++
> .../selftests/vfio/vfio_dma_mapping_test.c | 11 +-
> 7 files changed, 406 insertions(+), 24 deletions(-)
> create mode 100644 tools/testing/selftests/vfio/vfio_dma_mapping_perf_test.c
>
> --
> 2.55.0.1003.g10538fe699-goog
>
prev parent reply other threads:[~2026-10-08 10:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 15:33 [PATCH v3 0/4] Introduce vfio_dma_mapping_perf_test Aaron Lewis
2026-09-10 15:33 ` [PATCH v3 1/4] vfio: selftests: Assert the region was unmapped in iommu_unmap() Aaron Lewis
2026-09-10 15:33 ` [PATCH v3 2/4] vfio: selftests: Introduce vfio_dma_mapping_perf_test Aaron Lewis
2026-10-08 9:48 ` David Matlack
2026-09-10 15:33 ` [PATCH v3 3/4] vfio: selftests: Add memfd test to vfio_dma_mapping_perf_test Aaron Lewis
2026-10-08 10:03 ` David Matlack
2026-09-10 15:33 ` [PATCH v3 4/4] vfio: selftests: Allow a size for vfio_dma_mapping_perf_test Aaron Lewis
2026-09-10 15:41 ` sashiko-bot
2026-10-08 10:27 ` David Matlack
2026-10-08 10:30 ` David Matlack [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=asdw0Mep7etyQvrE@google.com \
--to=dmatlack@google.com \
--cc=aaronlewis@google.com \
--cc=alex@shazbot.org \
--cc=jgg@nvidia.com \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.