Re: [PATCH v5 1/2] selftests/resctrl: Implement cl_flush() and sb() for aarch64

From: Reinette Chatre

Date: Mon Nov 09 2026 - 12:13:36 EST


Hi Ben,

On 11/13/26 7:16 PM, Ben Horgan wrote:
> On 07/11/2026 00:29, Reinette Chatre wrote:

...
>>
>> If you do end up using a benchmark I'd suggest to make the checks as forgiving as
>> possible. For example, instead of checking something like "LLC occupancy needs to be
>> X when bitmap is Y" it should check something like "LLC occupancy when bitmap is all ones
>> is larger than LLC occupancy when only half of bitmap is ones".
>
> Do you think it's too strong to say that a bitmap with n + 1 bits set
> has higher occupancy than one with n bits set? I think it has slightly
> more utility in that all bits of the bitmap are plumbed down to a
> working control but I'm ok with a weaker check if a stronger check will
> just be problematic and maintenance heavy.

My comment was motivated by the recent change I needed to make to the CAT test
that uses cache misses measured via perf instead of cache occupancy. Originally
this test incremented the bitmap with one at each cycle but incrementing it with
two proved to be more robust.

What you are proposing sounds more like an enhancement to the CMT test that
uses cache occupancy as measurement while following the same methodology as the
CAT test. At the moment the CMT test just uses a single cycle of a hardcoded
(unless user provides something else) bitmap with five bits set. Even with this
I needed add enhancements to make it more robust:

commit ca0ea39288c9 ("selftests/resctrl: Reduce interference from L2 occupancy during cache occupancy test")
commit 7a214b4ec1c9 ("selftests/resctrl: Improve accuracy of cache occupancy test")

As one enhancement highlights the accuracy can be managed better on a system that
supports L2 as well as L3 allocation. Not all systems able to run such test will have such
capability. Also, looks like CMT does not require there to not be interference as the CAT
test does but with MPAM systems having each cache portion as shareable this may also be
a big influence on accuracy.

I am not able to judge if a test that uses LLC occupancy and relies on single bit increments
will be robust across all platforms of all architectures. Even so, I do see several risks
for such test to be reliable while I do not see how such fine grained increment provides
insight into resctrl kernel subsystem health.

Reinette