linux/tools/testing
Ilpo Järvinen bcdb2e9d9f selftests/resctrl: Read in less obvious order to defeat prefetch optimizations
When reading memory in order, HW prefetching optimizations will
interfere with measuring how caches and memory are being accessed. This
adds noise into the results.

Change the fill_buf reading loop to not use an obvious in-order access
using multiply by a prime and modulo.

Using a prime multiplier with modulo ensures the entire buffer is
eventually read. 23 is small enough that the reads are spread out but
wrapping does not occur very frequently (wrapping too often can trigger
L2 hits more frequently which causes noise to the test because getting
the data from LLC is not required).

It was discovered that not all primes work equally well and some can
cause wildly unstable results (e.g., in an earlier version of this
patch, the reads were done in reversed order and 59 was used as the
prime resulting in unacceptably high and unstable results in MBA and
MBM test on some architectures).

Link: https://lore.kernel.org/linux-kselftest/TYAPR01MB6330025B5E6537F94DA49ACB8B499@TYAPR01MB6330.jpnprd01.prod.outlook.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>
2024-02-13 13:56:44 -07:00
..
crypto/chacha20-s390
cxl Merge branch 'for-6.8/cxl-cper' into for-6.8/cxl 2024-01-09 19:21:44 -08:00
fault-injection
ktest
kunit kunit: tool: add test for parsing attributes 2023-12-18 13:21:15 -07:00
memblock mm, treewide: rename MAX_ORDER to MAX_PAGE_ORDER 2024-01-08 15:27:15 -08:00
nvdimm tools/testing/nvdimm: Add compile-test coverage for ndtest 2023-12-15 17:07:12 +01:00
radix-tree maple_tree: fix warning comparing pointer to 0 2023-12-20 14:48:12 -08:00
scatterlist
selftests selftests/resctrl: Read in less obvious order to defeat prefetch optimizations 2024-02-13 13:56:44 -07:00
vsock vsock/test: two tests to check credit update logic 2023-12-15 10:37:35 +00:00