From: Qinxin Xia <xiaqinxin@huawei.com>
To: <21cnbao@gmail.com>, <xiaqinxin@huawei.com>
Cc: <yangyicong@huawei.com>, <hch@lst.de>, <iommu@lists.linux.dev>,
<jonathan.cameron@huawei.com>, <prime.zeng@huawei.com>,
<fanghao11@huawei.com>, <linux-kernel@vger.kernel.org>,
<linuxarm@huawei.com>, <stable@vger.kernel.org>
Subject: [PATCH v3 0/4]{topost} dma-mapping: benchmark: Add support for dma_map_sg
Date: Fri, 9 May 2025 10:02:34 +0800 [thread overview]
Message-ID: <20250509020238.3378396-1-xiaqinxin@huawei.com> (raw)
Modify the framework to adapt to more map modes, add benchmark
support for dma_map_sg, and add support sg map mode in ioctl.
The result:
[root@localhost]# ./dma_map_benchmark -m 1 -g 8 -t 8 -s 30 -d 2
dma mapping mode: DMA_MAP_SG_MODE
dma mapping benchmark: threads:8 seconds:30 node:-1 dir:FROM_DEVICE granule/sg_nents: 8
average map latency(us):1.4 standard deviation:0.3
average unmap latency(us):1.3 standard deviation:0.3
[root@localhost]# ./dma_map_benchmark -m 0 -g 8 -t 8 -s 30 -d 2
dma mapping mode: DMA_MAP_SINGLE_MODE
dma mapping benchmark: threads:8 seconds:30 node:-1 dir:FROM_DEVICE granule/sg_nents: 8
average map latency(us):1.0 standard deviation:0.3
average unmap latency(us):1.3 standard deviation:0.5
---
Changes since V2:
- Address the comments from Barry and ALOK, some commit information and function
input parameter names are modified to make them more accurate.
- Link: https://lore.kernel.org/all/20250506030100.394376-1-xiaqinxin@huawei.com/
Changes since V1:
- Address the comments from Barry, added some comments and changed the unmap type to void.
- Link: https://lore.kernel.org/lkml/20250212022718.1995504-1-xiaqinxin@huawei.com/
Qinxin Xia (4):
dma-mapping: benchmark: Add padding to ensure uABI remained consistent
dma-mapping: benchmark: modify the framework to adapt to more map modes
dma-mapping: benchmark: add support for dma_map_sg
selftests/dma: Add dma_map_sg support
include/linux/map_benchmark.h | 46 +++-
kernel/dma/map_benchmark.c | 225 ++++++++++++++++--
.../testing/selftests/dma/dma_map_benchmark.c | 16 +-
3 files changed, 252 insertions(+), 35 deletions(-)
--
2.33.0
next reply other threads:[~2025-05-09 2:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-09 2:02 Qinxin Xia [this message]
2025-05-09 2:02 ` [PATCH v3 1/4] dma-mapping: benchmark: Add padding to ensure uABI remained consistent Qinxin Xia
2025-05-09 3:31 ` Barry Song
2025-05-09 6:43 ` Qinxin Xia
2025-05-09 2:02 ` [PATCH v3 2/4] dma-mapping: benchmark: modify the framework to adapt to more map modes Qinxin Xia
2025-05-09 2:02 ` [PATCH v3 3/4] dma-mapping: benchmark: add support for dma_map_sg Qinxin Xia
2025-05-09 2:04 ` kernel test robot
2025-05-09 2:02 ` [PATCH v3 4/4] selftests/dma: Add dma_map_sg support Qinxin Xia
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=20250509020238.3378396-1-xiaqinxin@huawei.com \
--to=xiaqinxin@huawei.com \
--cc=21cnbao@gmail.com \
--cc=fanghao11@huawei.com \
--cc=hch@lst.de \
--cc=iommu@lists.linux.dev \
--cc=jonathan.cameron@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=prime.zeng@huawei.com \
--cc=stable@vger.kernel.org \
--cc=yangyicong@huawei.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox