diff options
author | Barry Song <song.bao.hua@hisilicon.com> | 2020-11-16 19:08:48 +1300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2020-11-27 10:33:42 +0100 |
commit | 7679325702c90aecd393cd7cde685576c14489c0 (patch) | |
tree | f94582356bd5ab05baf6d1719f1a4a1a5eeafe3c /MAINTAINERS | |
parent | 65789daa8087e125927230ccb7e1eab13999b0cf (diff) | |
download | linux-7679325702c90aecd393cd7cde685576c14489c0.tar.gz linux-7679325702c90aecd393cd7cde685576c14489c0.tar.bz2 linux-7679325702c90aecd393cd7cde685576c14489c0.zip |
selftests/dma: add test application for DMA_MAP_BENCHMARK
This patch provides the test application for DMA_MAP_BENCHMARK.
Before running the test application, we need to bind a device to dma_map_
benchmark driver. For example, unbind "xxx" from its original driver and
bind to dma_map_benchmark:
echo dma_map_benchmark > /sys/bus/platform/devices/xxx/driver_override
echo xxx > /sys/bus/platform/drivers/xxx/unbind
echo xxx > /sys/bus/platform/drivers/dma_map_benchmark/bind
Another example for PCI devices:
echo dma_map_benchmark > /sys/bus/pci/devices/0000:00:01.0/driver_override
echo 0000:00:01.0 > /sys/bus/pci/drivers/xxx/unbind
echo 0000:00:01.0 > /sys/bus/pci/drivers/dma_map_benchmark/bind
The below command will run 16 threads on numa node 0 for 10 seconds on
the device bound to dma_map_benchmark platform_driver or pci_driver:
./dma_map_benchmark -t 16 -s 10 -n 0
dma mapping benchmark: threads:16 seconds:10
average map latency(us):1.1 standard deviation:1.9
average unmap latency(us):0.5 standard deviation:0.8
Cc: Will Deacon <will@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'MAINTAINERS')
-rw-r--r-- | MAINTAINERS | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index a008b70f3c16..c88abd1d323b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5237,6 +5237,12 @@ F: include/linux/dma-mapping.h F: include/linux/dma-map-ops.h F: kernel/dma/ +DMA MAPPING BENCHMARK +M: Barry Song <song.bao.hua@hisilicon.com> +L: iommu@lists.linux-foundation.org +F: kernel/dma/map_benchmark.c +F: tools/testing/selftests/dma/ + DMA-BUF HEAPS FRAMEWORK M: Sumit Semwal <sumit.semwal@linaro.org> R: Benjamin Gaignard <benjamin.gaignard@linaro.org> |