]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/resctrl: Simplify perf usage in CAT test
authorReinette Chatre <reinette.chatre@intel.com>
Sat, 4 Apr 2026 01:56:08 +0000 (18:56 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Tue, 5 May 2026 00:40:02 +0000 (18:40 -0600)
commitda707d9fedabf71d1973543f0cf244d2ef597c0d
tree0fe1117d7093800d2fdbfc447cea20f4add1851e
parentca2e4f4ba15a00218bff3b89ff57b20d0164de0a
selftests/resctrl: Simplify perf usage in CAT test

The CAT test relies on the PERF_COUNT_HW_CACHE_MISSES event to determine if
modifying a cache portion size is successful. This event is configured to
report the data as part of an event group, but no other events are added to
the group.

Remove the unnecessary PERF_FORMAT_GROUP format setting. This eliminates
the need for struct perf_event_read and results in read() of the associated
file descriptor to return just one value associated with the
PERF_COUNT_HW_CACHE_MISSES event of interest.

Link: https://lore.kernel.org/r/fb69325eba5031b735fa79effaaacd797c9c6040.1775266384.git.reinette.chatre@intel.com
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Tested-by: Chen Yu <yu.c.chen@intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/resctrl/cache.c
tools/testing/selftests/resctrl/cat_test.c
tools/testing/selftests/resctrl/resctrl.h