Linux Kernel Selftest development
 help / color / mirror / Atom feed
* [PATCH] selftests/resctrl: Allow CAT testing when no exclusive cache exists
@ 2026-05-23 10:17 Chen Yu
  2026-05-25 10:01 ` Ilpo Järvinen
  0 siblings, 1 reply; 8+ messages in thread
From: Chen Yu @ 2026-05-23 10:17 UTC (permalink / raw)
  To: Tony Luck, Reinette Chatre
  Cc: x86, Dave Martin, James Morse, Babu Moger, linux-kernel,
	linux-kselftest, Chen Yu, Hongyu Ning

The shareable_bits indicates which cache portions might be shared with
other agents (e.g., GPU, other I/O devices). On some platforms, all L3
cache ways are marked as potentially shared.

The L3_CAT test should fall back to using the full CBM mask when no
exclusive portion exists, since the test logic (writing different
schemata and measuring cache misses) still works. The shareable mask
is a hint about potential interference, not a hard exclusion.

Reported-by: Hongyu Ning <hongyu.ning@linux.intel.com>
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
---
 tools/testing/selftests/resctrl/cat_test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/resctrl/cat_test.c b/tools/testing/selftests/resctrl/cat_test.c
index f00b622c1460..b6994ba4504b 100644
--- a/tools/testing/selftests/resctrl/cat_test.c
+++ b/tools/testing/selftests/resctrl/cat_test.c
@@ -248,7 +248,7 @@ static int cat_run_test(const struct resctrl_test *test, const struct user_param
 	/* Get the largest contiguous exclusive portion of the cache */
 	ret = get_mask_no_shareable(test->resource, &long_mask);
 	if (ret)
-		return ret;
+		long_mask = full_cache_mask;
 
 	/* Get L3/L2 cache size */
 	ret = get_cache_size(uparams->cpu, test->resource, &cache_total_size);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-05-27  9:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-23 10:17 [PATCH] selftests/resctrl: Allow CAT testing when no exclusive cache exists Chen Yu
2026-05-25 10:01 ` Ilpo Järvinen
2026-05-25 11:59   ` Chen, Yu C
2026-05-26 15:25     ` Reinette Chatre
2026-05-27  1:57       ` Chen, Yu C
2026-05-27  2:24         ` Reinette Chatre
2026-05-27  4:52           ` Chen, Yu C
2026-05-27  9:49           ` Ilpo Järvinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox