app/dma-perf: introduce dma-perf application
RFC 1/1 app/dma-perf: introduce dma-perf application
There are many high-performance DMA devices supported in DPDK now, and these DMA devices can also be integrated into other modules of DPDK as accelerators, such as Vhost. Before integrating DMA into applications, developers need to know the performance of these DMA devices in various scenarios and the performance of CPUs in the same scenario, such as different buffer lengths. Only in this way can we know the target performance of the application accelerated by using them. This patch introduces a high-performance testing tool, which supports comparing the performance of CPU and DMA in different scenarios automatically with a pre-set config file. Memory Copy performance test are supported for now.
--- app/meson.build | 1 + app/test-dma-perf/benchmark.c | 537 ++++++++++++++++++++++++++++++++++ app/test-dma-perf/benchmark.h | 12 + app/test-dma-perf/config.ini | 61 ++++ app/test-dma-perf/main.c | 399 +++++++++++++++++++++++++ app/test-dma-perf/main.h | 55 ++++ app/test-dma-perf/meson.build | 16 + 7 files changed, 1081 insertions(+) create mode 100644 app/test-dma-perf/benchmark.c create mode 100644 app/test-dma-perf/benchmark.h create mode 100644 app/test-dma-perf/config.ini create mode 100644 app/test-dma-perf/main.c create mode 100644 app/test-dma-perf/main.h create mode 100644 app/test-dma-perf/meson.build
app/meson.build +1 -0
@@ -18,6 +18,7 @@ apps = [ 'test-pmd', 'test-regex', 'test-sad', + 'test-dma-perf', ] default_cflags = machine_args + ['-DALLOW_EXPERIMENTAL_API']
app/test-dma-perf/benchmark.c new file +537 -0
537 lines not on this page · raw message
app/test-dma-perf/benchmark.h new file +12 -0
@@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2022 Intel Corporation +*/ + +#ifndef _BENCHMARK_H_ +#define _BENCHMARK_H_ + +void dma_copy_benchmark (struct test_configure *cfg); + +void cpu_copy_benchmark (struct test_configure *cfg); + +#endif /* _BENCHMARK_H_ */
app/test-dma-perf/config.ini new file +61 -0
61 lines not on this page · raw message
app/test-dma-perf/main.c new file +399 -0
400 lines not on this page · raw message
app/test-dma-perf/main.h new file +55 -0
55 lines not on this page · raw message
app/test-dma-perf/meson.build new file +16 -0
@@ -0,0 +1,16 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2019-2022 Intel Corporation + +# meson file, for building this example as part of a main DPDK build. +# +# To build this example as a standalone application with an already-installed +# DPDK instance, use 'make' + +allow_experimental_apis = true + +deps += ['dmadev', 'mbuf', 'cfgfile'] + +sources = files( + 'main.c', + 'benchmark.c', +)
Signature · 1 line
2.35.1
Quoted 19 lines
From: Cheng Jiang [mailto:[email protected]]
Sent: Thursday, 15 September 2022 17.48There are many high-performance DMA devices supported in DPDK now, and these DMA devices can also be integrated into other modules of DPDK as accelerators, such as Vhost. Before integrating DMA into applications, developers need to know the performance of these DMA devices in various scenarios and the performance of CPUs in the same scenario, such as different buffer lengths. Only in this way can we know the target performance of the application accelerated by using them. This patch introduces a high-performance testing tool, which supports comparing the
performance of CPU and DMA in different scenarios automatically with a pre-set config file. Memory Copy performance test are supported for now.Signed-off-by Cheng Jiang <[email protected]>Signed-off-by Jiayu Hu <[email protected]>Signed-off-by Yuan Wang <[email protected]>
Quoted 16 lines
--- app/meson.build | 1 + app/test-dma-perf/benchmark.c | 537 ++++++++++++++++++++++++++++++++++ app/test-dma-perf/benchmark.h | 12 + app/test-dma-perf/config.ini | 61 ++++ app/test-dma-perf/main.c | 399 +++++++++++++++++++++++++ app/test-dma-perf/main.h | 55 ++++ app/test-dma-perf/meson.build | 16 + 7 files changed, 1081 insertions(+) create mode 100644 app/test-dma-perf/benchmark.c create mode 100644 app/test-dma-perf/benchmark.h create mode 100644 app/test-dma-perf/config.ini create mode 100644 app/test-dma-perf/main.c create mode 100644 app/test-dma-perf/main.h create mode 100644 app/test-dma-perf/meson.build
Excellent, thank you!
Is there any reason for making this a separate application, instead of part of the /app/test/ application?
NB: Someone could have asked the same question about test-compress-dev and similar applications... ;-)
Hi,
Replies are inline.
Quoted 47 lines
-----Original Message-----
From: Morten Brørup <[email protected]>
Sent: Friday, September 16, 2022 3:36 PM
To: Jiang, Cheng1 <[email protected]>; [email protected]; Richardson, Bruce <[email protected]>
Cc: [email protected]; Hu, Jiayu <[email protected]>; Ding, Xuan <[email protected]>; Ma, WenwuX <[email protected]>; Wang, YuanX <[email protected]>; Yang, YvonneX <[email protected]>; He, Xingguang <[email protected]>
Subject: RE: [RFC] app/dma-perf: introduce dma-perf applicationQuoted 4 lines
From: Cheng Jiang [mailto:[email protected]]
Sent: Thursday, 15 September 2022 17.48There are many high-performance DMA devices supported in DPDK now,
and
Quoted 25 lines
these DMA devices can also be integrated into other modules of DPDK as accelerators, such as Vhost. Before integrating DMA into applications, developers need to know the performance of these DMA devices in various scenarios and the performance of CPUs in the same scenario, such as different buffer lengths. Only in this way can we know the target performance of the application accelerated by using them. This patch introduces a high-performance testing tool, which supports comparing the performance of CPU and DMA in different scenarios automatically with a pre-set config file. Memory Copy performance test are supported for now.
Signed-off-by Cheng Jiang <[email protected]>Signed-off-by Jiayu Hu <[email protected]>Signed-off-by Yuan Wang <[email protected]>--- app/meson.build | 1 + app/test-dma-perf/benchmark.c | 537 ++++++++++++++++++++++++++++++++++ app/test-dma-perf/benchmark.h | 12 + app/test-dma-perf/config.ini | 61 ++++ app/test-dma-perf/main.c | 399 +++++++++++++++++++++++++ app/test-dma-perf/main.h | 55 ++++ app/test-dma-perf/meson.build | 16 + 7 files changed, 1081 insertions(+) create mode 100644 app/test-dma-perf/benchmark.c create mode 100644Quoted 5 lines
app/test-dma-perf/benchmark.hcreate mode 100644 app/test-dma-perf/config.ini create mode 100644app/test-dma-perf/main.ccreate mode 100644app/test-dma-perf/main.hcreate mode 100644 app/test-dma-perf/meson.build
Quoted 1 line
Excellent, thank you!
Sure, thanks!!
Quoted 7 lines
Is there any reason for making this a separate application, instead of part of the /app/test/ application?
NB: Someone could have asked the same question about test-compress-dev and similar applications... ;-)
First of all, this application is specifically used to test the performance of DMA device, and does not involve functional testing. So I'm not sure whether it is suitable for the app/test.
Secondly, the configuration and switching of many test scenarios are involved here, so we think it may be a more appropriate to be an independent application.
Quoted 2 lines
Acked-by Morten Brørup <[email protected]>
Thanks for your acknowledgement.
Cheng
Quoted 8 lines
From: Jiang, Cheng1 [mailto:[email protected]]
Sent: Monday, 19 September 2022 10.10Quoted 5 lines
From: Morten Brørup <[email protected]>
Sent: Friday, September 16, 2022 3:36 PMQuoted 2 lines
From: Cheng Jiang [mailto:[email protected]]
Sent: Thursday, 15 September 2022 17.48
[...]
Quoted 5 lines
Quoted 1 line
Is there any reason for making this a separate application, instead
of part of
Quoted 3 lines
the /app/test/ application?
Quoted 7 lines
Quoted 1 line
NB: Someone could have asked the same question about test-compress-
dev
Quoted 1 line
and similar applications... ;-)
First of all, this application is specifically used to test the performance of DMA device, and does not involve functional testing. So I'm not sure whether it is suitable for the app/test.
Good point.
Quoted 3 lines
Secondly, the configuration and switching of many test scenarios are involved here, so we think it may be a more appropriate to be an independent application.
Makes sense to me. The independent application might provide more flexibility.
Quoted 6 lines
Quoted 3 lines
Acked-by Morten Brørup <[email protected]>Thanks for your acknowledgement.
Cheng
RFC v2 1/1 app/dma-perf: introduce dma-perf application
In reply to Cheng JiangThere are many high-performance DMA devices supported in DPDK now, and these DMA devices can also be integrated into other modules of DPDK as accelerators, such as Vhost. Before integrating DMA into applications, developers need to know the performance of these DMA devices in various scenarios and the performance of CPUs in the same scenario, such as different buffer lengths. Only in this way can we know the target performance of the application accelerated by using them. This patch introduces a high-performance testing tool, which supports comparing the performance of CPU and DMA in different scenarios automatically with a pre-set config file. Memory Copy performance test are supported for now.
---
v2: fixed some CI issues.
app/meson.build | 1 + app/test-dma-perf/benchmark.c | 543 ++++++++++++++++++++++++++++++++++ app/test-dma-perf/benchmark.h | 12 + app/test-dma-perf/config.ini | 61 ++++ app/test-dma-perf/main.c | 404 +++++++++++++++++++++++++ app/test-dma-perf/main.h | 55 ++++ app/test-dma-perf/meson.build | 16 + 7 files changed, 1092 insertions(+) create mode 100644 app/test-dma-perf/benchmark.c create mode 100644 app/test-dma-perf/benchmark.h create mode 100644 app/test-dma-perf/config.ini create mode 100644 app/test-dma-perf/main.c create mode 100644 app/test-dma-perf/main.h create mode 100644 app/test-dma-perf/meson.build
app/meson.build +1 -0
@@ -18,6 +18,7 @@ apps = [ 'test-pmd', 'test-regex', 'test-sad', + 'test-dma-perf', ] default_cflags = machine_args + ['-DALLOW_EXPERIMENTAL_API']
app/test-dma-perf/benchmark.c new file +543 -0
543 lines not on this page · raw message
app/test-dma-perf/benchmark.h new file +12 -0
@@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2022 Intel Corporation +*/ + +#ifndef _BENCHMARK_H_ +#define _BENCHMARK_H_ + +void dma_copy_benchmark (struct test_configure *cfg); + +void cpu_copy_benchmark (struct test_configure *cfg); + +#endif /* _BENCHMARK_H_ */
app/test-dma-perf/config.ini new file +61 -0
61 lines not on this page · raw message
app/test-dma-perf/main.c new file +404 -0
404 lines not on this page · raw message
app/test-dma-perf/main.h new file +55 -0
55 lines not on this page · raw message
app/test-dma-perf/meson.build new file +16 -0
@@ -0,0 +1,16 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2019-2022 Intel Corporation + +# meson file, for building this example as part of a main DPDK build. +# +# To build this example as a standalone application with an already-installed +# DPDK instance, use 'make' + +allow_experimental_apis = true + +deps += ['dmadev', 'mbuf', 'cfgfile'] + +sources = files( + 'main.c', + 'benchmark.c', +)
--
2.35.1
RFC v3 1/1 app/dma-perf: introduce dma-perf application
In reply to Cheng JiangThere are many high-performance DMA devices supported in DPDK now, and these DMA devices can also be integrated into other modules of DPDK as accelerators, such as Vhost. Before integrating DMA into applications, developers need to know the performance of these DMA devices in various scenarios and the performance of CPUs in the same scenario, such as different buffer lengths. Only in this way can we know the target performance of the application accelerated by using them. This patch introduces a high-performance testing tool, which supports comparing the performance of CPU and DMA in different scenarios automatically with a pre-set config file. Memory Copy performance test are supported for now.
---
v3: improved nr_buf calculation and added support for getting subprocess exit status
v2: fixed some CI issues.
app/meson.build | 1 + app/test-dma-perf/benchmark.c | 538 ++++++++++++++++++++++++++++++++++ app/test-dma-perf/benchmark.h | 12 + app/test-dma-perf/config.ini | 61 ++++ app/test-dma-perf/main.c | 417 ++++++++++++++++++++++++++ app/test-dma-perf/main.h | 55 ++++ app/test-dma-perf/meson.build | 16 + 7 files changed, 1100 insertions(+) create mode 100644 app/test-dma-perf/benchmark.c create mode 100644 app/test-dma-perf/benchmark.h create mode 100644 app/test-dma-perf/config.ini create mode 100644 app/test-dma-perf/main.c create mode 100644 app/test-dma-perf/main.h create mode 100644 app/test-dma-perf/meson.build
app/meson.build +1 -0
@@ -18,6 +18,7 @@ apps = [ 'test-pmd', 'test-regex', 'test-sad', + 'test-dma-perf', ] default_cflags = machine_args + ['-DALLOW_EXPERIMENTAL_API']
app/test-dma-perf/benchmark.c new file +538 -0
538 lines not on this page · raw message
app/test-dma-perf/benchmark.h new file +12 -0
@@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2022 Intel Corporation +*/ + +#ifndef _BENCHMARK_H_ +#define _BENCHMARK_H_ + +void dma_copy_benchmark (struct test_configure *cfg); + +void cpu_copy_benchmark (struct test_configure *cfg); + +#endif /* _BENCHMARK_H_ */
app/test-dma-perf/config.ini new file +61 -0
61 lines not on this page · raw message
app/test-dma-perf/main.c new file +417 -0
417 lines not on this page · raw message
app/test-dma-perf/main.h new file +55 -0
55 lines not on this page · raw message
app/test-dma-perf/meson.build new file +16 -0
@@ -0,0 +1,16 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2019-2022 Intel Corporation + +# meson file, for building this example as part of a main DPDK build. +# +# To build this example as a standalone application with an already-installed +# DPDK instance, use 'make' + +allow_experimental_apis = true + +deps += ['dmadev', 'mbuf', 'cfgfile'] + +sources = files( + 'main.c', + 'benchmark.c', +)
--
2.35.1
Quoted 12 lines · Cheng Jiang
There are many high-performance DMA devices supported in DPDK now, and these DMA devices can also be integrated into other modules of DPDK as accelerators, such as Vhost. Before integrating DMA into applications, developers need to know the performance of these DMA devices in various scenarios and the performance of CPUs in the same scenario, such as different buffer lengths. Only in this way can we know the target performance of the application accelerated by using them. This patch introduces a high-performance testing tool, which supports comparing the performance of CPU and DMA in different scenarios automatically with a pre-set config file. Memory Copy performance test are supported for now.
Quoted 7 lines
Signed-off-by Cheng Jiang <[email protected]>Signed-off-by Jiayu Hu <[email protected]>Signed-off-by Yuan Wang <[email protected]>Acked-by Morten Brørup <[email protected]>---
v3: improvednr_bufcalculation and added support for getting subprocess exit status
v2: fixed some CI issues.
There is still at least one build issue.
Signature · 1 line
David Marchand
Sure, I'll take a look and fix them in the next version.
Thanks,
Cheng
Quoted 42 lines
-----Original Message-----
From: David Marchand <[email protected]>
Sent: Friday, October 21, 2022 9:29 PM
To: Jiang, Cheng1 <[email protected]>
Cc: [email protected]; Richardson, Bruce <[email protected]>; [email protected]; [email protected]; Hu, Jiayu <[email protected]>; Ding, Xuan <[email protected]>; Ma, WenwuX <[email protected]>; Wang, YuanX <[email protected]>; Yang, YvonneX <[email protected]>; He, Xingguang <[email protected]>
Subject: Re: [RFC v3] app/dma-perf: introduce dma-perf applicationQuoted 2 lines · Cheng Jiang
There are many high-performance DMA devices supported in DPDK now,
and
Quoted 9 lines
these DMA devices can also be integrated into other modules of DPDK as accelerators, such as Vhost. Before integrating DMA into applications, developers need to know the performance of these DMA devices in various scenarios and the performance of CPUs in the same scenario, such as different buffer lengths. Only in this way can we know the target performance of the application accelerated by using them. This patch introduces a high-performance testing tool, which supports comparing the performance of CPU and DMA in different scenarios automatically with a pre-set config file. Memory Copy performance test are
supported for now.
Quoted 9 lines
Signed-off-by Cheng Jiang <[email protected]>Signed-off-by Jiayu Hu <[email protected]>Signed-off-by Yuan Wang <[email protected]>Acked-by Morten Brørup <[email protected]>---
v3: improvednr_bufcalculation and added support for getting subprocess exit status
v2: fixed some CI issues.There is still at least one build issue.
--
David Marchand
RFC v4 1/1 app/dma-perf: introduce dma-perf application
In reply to Cheng JiangThere are many high-performance DMA devices supported in DPDK now, and these DMA devices can also be integrated into other modules of DPDK as accelerators, such as Vhost. Before integrating DMA into applications, developers need to know the performance of these DMA devices in various scenarios and the performance of CPUs in the same scenario, such as different buffer lengths. Only in this way can we know the target performance of the application accelerated by using them. This patch introduces a high-performance testing tool, which supports comparing the performance of CPU and DMA in different scenarios automatically with a pre-set config file. Memory Copy performance test are supported for now.
---
v4: fixed some building issues.
v3: improved nr_buf calculation and added support for getting subprocess exit status.
v2: fixed some CI issues.
app/meson.build | 1 + app/test-dma-perf/benchmark.c | 537 ++++++++++++++++++++++++++++++++++ app/test-dma-perf/benchmark.h | 12 + app/test-dma-perf/config.ini | 61 ++++ app/test-dma-perf/main.c | 416 ++++++++++++++++++++++++++ app/test-dma-perf/main.h | 55 ++++ app/test-dma-perf/meson.build | 16 + 7 files changed, 1098 insertions(+) create mode 100644 app/test-dma-perf/benchmark.c create mode 100644 app/test-dma-perf/benchmark.h create mode 100644 app/test-dma-perf/config.ini create mode 100644 app/test-dma-perf/main.c create mode 100644 app/test-dma-perf/main.h create mode 100644 app/test-dma-perf/meson.build
app/meson.build +1 -0
@@ -18,6 +18,7 @@ apps = [ 'test-pmd', 'test-regex', 'test-sad', + 'test-dma-perf', ] default_cflags = machine_args + ['-DALLOW_EXPERIMENTAL_API']
app/test-dma-perf/benchmark.c new file +537 -0
537 lines not on this page · raw message
app/test-dma-perf/benchmark.h new file +12 -0
@@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2022 Intel Corporation +*/ + +#ifndef _BENCHMARK_H_ +#define _BENCHMARK_H_ + +void dma_copy_benchmark (struct test_configure *cfg); + +void cpu_copy_benchmark (struct test_configure *cfg); + +#endif /* _BENCHMARK_H_ */
app/test-dma-perf/config.ini new file +61 -0
61 lines not on this page · raw message
app/test-dma-perf/main.c new file +416 -0
416 lines not on this page · raw message
app/test-dma-perf/main.h new file +55 -0
55 lines not on this page · raw message
app/test-dma-perf/meson.build new file +16 -0
@@ -0,0 +1,16 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2019-2022 Intel Corporation + +# meson file, for building this example as part of a main DPDK build. +# +# To build this example as a standalone application with an already-installed +# DPDK instance, use 'make' + +allow_experimental_apis = true + +deps += ['dmadev', 'mbuf', 'cfgfile'] + +sources = files( + 'main.c', + 'benchmark.c', +)
--
2.35.1
RFC v5 1/1 app/dma-perf: introduce dma-perf application
In reply to Cheng JiangThere are many high-performance DMA devices supported in DPDK now, and these DMA devices can also be integrated into other modules of DPDK as accelerators, such as Vhost. Before integrating DMA into applications, developers need to know the performance of these DMA devices in various scenarios and the performance of CPUs in the same scenario, such as different buffer lengths. Only in this way can we know the target performance of the application accelerated by using them. This patch introduces a high-performance testing tool, which supports comparing the performance of CPU and DMA in different scenarios automatically with a pre-set config file. Memory Copy performance test are supported for now.
---
v5: fixed some typos.
v4: fixed some building issues.
v3: improved nr_buf calculation and added support for getting subprocess exit status.
v2: fixed some CI issues.
app/meson.build | 1 + app/test-dma-perf/benchmark.c | 537 ++++++++++++++++++++++++++++++++++ app/test-dma-perf/benchmark.h | 12 + app/test-dma-perf/config.ini | 61 ++++ app/test-dma-perf/main.c | 416 ++++++++++++++++++++++++++ app/test-dma-perf/main.h | 55 ++++ app/test-dma-perf/meson.build | 16 + 7 files changed, 1098 insertions(+) create mode 100644 app/test-dma-perf/benchmark.c create mode 100644 app/test-dma-perf/benchmark.h create mode 100644 app/test-dma-perf/config.ini create mode 100644 app/test-dma-perf/main.c create mode 100644 app/test-dma-perf/main.h create mode 100644 app/test-dma-perf/meson.build
app/meson.build +1 -0
@@ -18,6 +18,7 @@ apps = [ 'test-pmd', 'test-regex', 'test-sad', + 'test-dma-perf', ] default_cflags = machine_args + ['-DALLOW_EXPERIMENTAL_API']
app/test-dma-perf/benchmark.c new file +537 -0
537 lines not on this page · raw message
app/test-dma-perf/benchmark.h new file +12 -0
@@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2022 Intel Corporation +*/ + +#ifndef _BENCHMARK_H_ +#define _BENCHMARK_H_ + +void dma_mem_copy_benchmark (struct test_configure *cfg); + +void cpu_mem_copy_benchmark (struct test_configure *cfg); + +#endif /* _BENCHMARK_H_ */
app/test-dma-perf/config.ini new file +61 -0
61 lines not on this page · raw message
app/test-dma-perf/main.c new file +416 -0
416 lines not on this page · raw message
app/test-dma-perf/main.h new file +55 -0
55 lines not on this page · raw message
app/test-dma-perf/meson.build new file +16 -0
@@ -0,0 +1,16 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2019-2022 Intel Corporation + +# meson file, for building this example as part of a main DPDK build. +# +# To build this example as a standalone application with an already-installed +# DPDK instance, use 'make' + +allow_experimental_apis = true + +deps += ['dmadev', 'mbuf', 'cfgfile'] + +sources = files( + 'main.c', + 'benchmark.c', +)
--
2.35.1