Skip to content

dma-mapping: benchmark: Add support for dma_map_sg

Qinxin Xia linux-iommu lkml 9 versions – Applied

Status from this message: Applied to dma-mapping-next. Thanks! Next time please CC: me directly.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest3 patches 4 repliesApplied
  2. v63 patches 4 repliesSuperseded
  3. v5 posting 2/23 patches 9 repliesSuperseded
Earlier versions · 6
VersionPostedPatchesRepliesStatus
v5 posting 1/22 patches4 repliesApplied
v4 posting 2/24 patches6 repliesSuperseded
v4 posting 1/24 patches0 repliesSuperseded
v34 patches8 repliesSuperseded
v24 patches12 repliesSuperseded
v13 patches11 repliesSuperseded

Changes in v7 from the cover letter

- Address the comments from Barry, update the comment of the granule.
- Link: https://lore.kernel.org/lkml/[email protected]/

Patches in v7 Applied

#Subject and filesSizeRepliesApplied
1/3dma-mapping: benchmark: modify the framework to adapt to more map modesinclude/uapi/linux/map_benchmark.h kernel/dma/map_benchmark.c+115 -240 replies
2/3dma-mapping: benchmark: add support for dma_map_sginclude/uapi/linux/map_benchmark.h kernel/dma/map_benchmark.c+119 -10 replies
3/3tools/dma: Add dma_map_sg supporttools/dma/dma_map_benchmark.c+20 -30 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchBarry Song
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v7 thread

Cover letter [PATCH v7 0/3] dma-mapping: benchmark: Add support for dma_map_sg

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 benchmark(SG_MODE): 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 benchmark(SINGLE_MODE): 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 V6:
- Address the comments from Barry, update the comment of the granule.
- Link: https://lore.kernel.org/lkml/[email protected]/

Changes since V5:
- Address the comments from Barry, the incorrect and unnecessary 'prepare_data' judgment is deleted and renamed 'prepare_data()' to 'initialize_data()'. The mode and
other parameters in the output print are placed in the same print. In addition, the incorrect map_mode judgment in ioctrl and the wrong path in sg:prepare() does not release 'params' is fixed.
- Link: https://lore.kernel.org/all/[email protected]/

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/[email protected]/

Changes since V3:
- Address the comments from Barry, change mode to a more specific namespace.
- Link: https://lore.kernel.org/all/[email protected]/

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/[email protected]/

Changes since V1:
- Address the comments from Barry, added some comments and changed the unmap type to void.
- Link: https://lore.kernel.org/lkml/[email protected]/

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 |  13 +-
 kernel/dma/map_benchmark.c         | 246 ++++++++++++++++++++++++++---
 tools/dma/dma_map_benchmark.c      |  23 ++-
 3 files changed, 254 insertions(+), 28 deletions(-)
Signature · 1 line
2.33.0