diff options
author | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2023-12-15 17:05:08 +0200 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2024-02-13 13:56:45 -0700 |
commit | 205de6ddd7fff9340bd5e4b68105f28120671c6b (patch) | |
tree | 3caf68451feb9252e5d6ba63c74025e20f845916 /tools/debugging | |
parent | bcdb2e9d9f319935938a5addee040e37b60192ff (diff) | |
download | linux-stable-205de6ddd7fff9340bd5e4b68105f28120671c6b.tar.gz linux-stable-205de6ddd7fff9340bd5e4b68105f28120671c6b.tar.bz2 linux-stable-205de6ddd7fff9340bd5e4b68105f28120671c6b.zip |
selftests/resctrl: Rewrite Cache Allocation Technology (CAT) test
CAT test spawns two processes into two different control groups with
exclusive schemata. Both the processes alloc a buffer from memory
matching their allocated LLC block size and flush the entire buffer out
of caches. Since the processes are reading through the buffer only once
during the measurement and initially all the buffer was flushed, the
test isn't testing CAT.
Rewrite the CAT test to allocate a buffer sized to half of LLC. Then
perform a sequence of tests with different LLC alloc sizes starting
from half of the CBM bits down to 1-bit CBM. Flush the buffer before
each test and read the buffer twice. Observe the LLC misses on the
second read through the buffer. As the allocated LLC block gets smaller
and smaller, the LLC misses will become larger and larger giving a
strong signal on CAT working properly.
The new CAT test is using only a single process because it relies on
measured effect against another run of itself rather than another
process adding noise. The rest of the system is set to use the CBM bits
not used by the CAT test to keep the test isolated.
Replace count_bits() with count_contiguous_bits() to get the first bit
position in order to be able to calculate masks based on it.
This change has been tested with a number of systems from different
generations.
Suggested-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/debugging')
0 files changed, 0 insertions, 0 deletions