[PATCH v2] test/ring_perf: add optional cross L3 core selection
Bruce Richardson
bruce.richardson at intel.com
Mon Oct 20 10:57:18 CEST 2025
On Sat, Oct 18, 2025 at 06:48:27AM +0000, Sivaprasad Tummala wrote:
> Enhances test_ring_perf to optionally select two cores on
> the same socket but on different L3 caches using hwloc.
>
> This allows performance characterization of ring library
> on processors with split L3 cache architectures, providing
> more realistic measurements of inter-core communication
> and cache effects.
>
> The feature is conditional on hwloc being present, ensuring
> builds succeed on systems without hwloc.
>
> Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala at amd.com>
>
> v2:
> * Localized hwloc dependency to test app only.
> * Optimized get_two_l3caches() by moving socket and L3 cache ID
> retrieval to the outer loop.
> ---
> app/meson.build | 8 ++++-
> app/test/test_ring_perf.c | 76 +++++++++++++++++++++++++++++++++++++++
> 2 files changed, 83 insertions(+), 1 deletion(-)
>
> diff --git a/app/meson.build b/app/meson.build
> index 1798db3ae4..5443043f0c 100644
> --- a/app/meson.build
> +++ b/app/meson.build
> @@ -46,6 +46,12 @@ if get_option('default_library') == 'static' and not is_windows
> default_ldflags += ['-Wl,--export-dynamic']
> endif
>
> +hwloc_dep = dependency('hwloc', required : false)
> +if hwloc_dep.found()
> + default_cflags += ['-DHAVE_HWLOC=1']
> + message('hwloc found — enabling L3 cache–aware topology support')
> +endif
> +
> foreach app:apps
> name = app
> build = true
> @@ -60,7 +66,7 @@ foreach app:apps
>
> # use "deps" for internal DPDK dependencies, and "ext_deps" for
> # external package/library requirements
> - ext_deps = []
> + ext_deps = [hwloc_dep]
> deps = []
>
> if not enable_apps.contains(app)
I still think we can limit this more. No need, for example, for test-pmd or
test-cmdline, for that matter, to depend on hwloc. Therefore, I'd suggest
moving the dependency code to app/test/meson.build and adding it there.
/Bruce
More information about the dev
mailing list