Hi Chenyu,

On 5/25/26 4:59 AM, Chen, Yu C wrote:
> Hi Ilpo,
> 
> On 5/25/2026 6:01 PM, Ilpo Järvinen wrote:
>> On Sat, 23 May 2026, Chen Yu wrote:
>>
>>> 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

How do you define "still works"? Allowing more interference will impact the
number of cache misses that is used to determine effectiveness of cache
allocation, no?

>>> is a hint about potential interference, not a hard exclusion.
>>>
>>> Reported-by: Hongyu Ning <[email protected]>
>>> Signed-off-by: Chen Yu <[email protected]>
>>> ---
>>>   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;
>>
>> Wouldn't it warrant to log something when the fallback occurs? It
>> certainly looks something that makes the results less reliable (so it
>> would be nice to know about it when looking at the test results).
>>
> 
> Got it. Let me add the following message:
> ksft_print_msg("No exclusive cache portion found, fall back to full cache 
> mask\n");

Allowing more interference will cause the test to fail while the system behaves 
correctly.
This log message may help a knowledgeable user running the test manually but I 
expect would
be confusing to folks not familiar with resctrl and definitely does not help 
test automation
that just looks for the pass/fail.

The test can be fixed by skipping the test, instead of failing, if there are no 
bits
available for the test to run as intended. Of course, this will prevent CAT 
mechanics to
be tested on this platform so to test CAT on this platform there is a need a 
new functional
test since a performance test is not appropriate.

Reinette

Reply via email to