|
|
Log in / Subscribe / Register

selftests/resctrl: Add dynamic linked list management for IMC counters

From:  Yifan Wu <wuyifan50-AT-huawei.com>
To:  <wuyifan50-AT-huawei.com>, <tony.luck-AT-intel.com>, <reinette.chatre-AT-intel.com>, <Dave.Martin-AT-arm.com>, <james.morse-AT-arm.com>, <babu.moger-AT-amd.com>, <shuah-AT-kernel.org>, <tan.shaopeng-AT-fujitsu.com>, <fenghuay-AT-nvidia.com>, <ben.horgan-AT-arm.com>, <zengheng4-AT-huawei.com>, <linux-kernel-AT-vger.kernel.org>, <linux-arm-kernel-AT-lists.infradead.org>, <linux-kselftest-AT-vger.kernel.org>, <linuxarm-AT-huawei.com>
Subject:  [PATCH v3 0/3] selftests/resctrl: Add dynamic linked list management for IMC counters
Date:  Fri, 22 May 2026 17:05:37 +0800
Message-ID:  <20260522090540.444554-1-wuyifan50@huawei.com>
Cc:  <xiaqinxin-AT-huawei.com>, <prime.zeng-AT-hisilicon.com>, <wangyushan12-AT-huawei.com>, <xuwei5-AT-huawei.com>, <fanghao11-AT-huawei.com>, <wangzhou1-AT-hisilicon.com>
Archive-link:  Article

Hi all,

This patch series introduces dynamic linked list management for IMC
counters, enabling the tests to use all available counters detected by
hardware instead of a fixed upper limit, without the need for array
bounds checking.

This series is based on Reinette's patch series aimed at fixing the
resctrl tests, available at:
https://lore.kernel.org/lkml/cover.1775266384.git.reinett...

Changes in v3:
- Rename functions and update comments.
- Split the patches into incremental changes.
- Explicitly release memory after failing to parse the imc config.

Changes in v2:
- Fix code style and variable names.
- Integrate linked list initialization and cleanup into patch 1.
- Split the conversion from arrays to linked list across the remaining
  patches.
- Remove the IMC count and the global imcs variable.

v2: https://lore.kernel.org/all/20260410093352.3988125-1-wuyi...
v1: https://lore.kernel.org/all/20260324125034.1509177-1-wuyi...

Yifan Wu (3):
  selftests/resctrl: Introduce linked list management for IMC counters
  selftests/resctrl: Replace counter index references with pointers
  selftests/resctrl: Enable dynamic management of IMC counters via
    linked list

 tools/testing/selftests/resctrl/mba_test.c    |   1 +
 tools/testing/selftests/resctrl/mbm_test.c    |   1 +
 tools/testing/selftests/resctrl/resctrl.h     |   2 +
 tools/testing/selftests/resctrl/resctrl_val.c | 160 ++++++++++--------
 4 files changed, 91 insertions(+), 73 deletions(-)

-- 
2.34.1




Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds