mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Qinxin Xia <xiaqinxin@huawei.com>
To: <21cnbao@gmail.com>, <xiaqinxin@huawei.com>,
	<jonathan.cameron@huawei.com>, <wangzhou1@hisilicon.com>
Cc: <iommu@lists.linux.dev>, <prime.zeng@huawei.com>,
	<fanghao11@huawei.com>, <linux-kernel@vger.kernel.org>,
	<linuxarm@huawei.com>
Subject: [PATCH v5 0/3] dma-mapping: benchmark: Add support for dma_map_sg
Date: Mon, 22 Dec 2025 23:32:43 +0800	[thread overview]
Message-ID: <20251222153246.2220659-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 V4:
- Address the comments from Barry and Jonathan, irrelevant patches are deleted and
  the original cache processing logic is restored with add prepare_data().
- Link: https://lore.kernel.org/all/20250614143454.2927363-3-xiaqinxin@huawei.com/

Changes since V3:
- Address the comments from Barry, change mode to a more specific namespace.
- Link: https://lore.kernel.org/all/20250509020238.3378396-1-xiaqinxin@huawei.com/

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 (3):
  dma-mapping: benchmark: modify the framework to adapt to more map modes
  dma-mapping: benchmark: add support for dma_map_sg
  tools/dma: Add dma_map_sg support

 include/uapi/linux/map_benchmark.h |   9 +-
 kernel/dma/map_benchmark.c         | 245 ++++++++++++++++++++++++++---
 tools/dma/dma_map_benchmark.c      |  17 +-
 3 files changed, 246 insertions(+), 25 deletions(-)

-- 
2.33.0


             reply	other threads:[~2025-12-22 15:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-22 15:32 Qinxin Xia [this message]
2025-12-22 15:32 ` [PATCH v5 1/3] dma-mapping: benchmark: modify the framework to adapt to more map modes Qinxin Xia
2025-12-22 21:03   ` Barry Song
2025-12-23  2:51     ` Qinxin Xia
2025-12-23  2:58       ` Barry Song
2025-12-23  3:13         ` Qinxin Xia
2025-12-23  3:25           ` Qinxin Xia
2025-12-23  3:12       ` Barry Song
2025-12-22 15:32 ` [PATCH v5 2/3] dma-mapping: benchmark: add support for dma_map_sg Qinxin Xia
2025-12-22 21:12   ` Barry Song
2025-12-22 15:32 ` [PATCH v5 3/3] tools/dma: Add dma_map_sg support Qinxin Xia
2025-12-22 21:10   ` Barry Song
2025-12-23  3:14     ` 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=20251222153246.2220659-1-xiaqinxin@huawei.com \
    --to=xiaqinxin@huawei.com \
    --cc=21cnbao@gmail.com \
    --cc=fanghao11@huawei.com \
    --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=wangzhou1@hisilicon.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

all inboxes | Powered by JetHome®