|
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4, v6.15-rc3, v6.15-rc2, v6.15-rc1, v6.14, v6.14-rc7, v6.14-rc6, v6.14-rc5, v6.14-rc4, v6.14-rc3, v6.14-rc2, v6.14-rc1, v6.13, v6.13-rc7, v6.13-rc6, v6.13-rc5, v6.13-rc4, v6.13-rc3, v6.13-rc2, v6.13-rc1, v6.12, v6.12-rc7, v6.12-rc6, v6.12-rc5, v6.12-rc4, v6.12-rc3, v6.12-rc2, v6.12-rc1, v6.11, v6.11-rc7 |
|
| #
7beaf1da |
| 05-Sep-2024 |
Shuah Khan <[email protected]> |
selftests:resctrl: Fix build failure on archs without __cpuid_count()
When resctrl is built on architectures without __cpuid_count() support, build fails. resctrl uses __cpuid_count() defined in kse
selftests:resctrl: Fix build failure on archs without __cpuid_count()
When resctrl is built on architectures without __cpuid_count() support, build fails. resctrl uses __cpuid_count() defined in kselftest.h.
Even though the problem is seen while building resctrl on aarch64, this error can be seen on any platform that doesn't support CPUID.
CPUID is a x86/x86-64 feature and code paths with CPUID asm commands will fail to build on all other architectures.
All others tests call __cpuid_count() do so from x86/x86_64 code paths when _i386__ or __x86_64__ are defined. resctrl is an exception.
Fix the problem by defining __cpuid_count() only when __i386__ or __x86_64__ are defined in kselftest.h and changing resctrl to call __cpuid_count() only when __i386__ or __x86_64__ are defined.
In file included from resctrl.h:24, from cat_test.c:11: In function ‘arch_supports_noncont_cat’, inlined from ‘noncont_cat_run_test’ at cat_test.c:326:6: ../kselftest.h:74:9: error: impossible constraint in ‘asm’ 74 | __asm__ __volatile__ ("cpuid\n\t" \ | ^~~~~~~ cat_test.c:304:17: note: in expansion of macro ‘__cpuid_count’ 304 | __cpuid_count(0x10, 1, eax, ebx, ecx, edx); | ^~~~~~~~~~~~~ ../kselftest.h:74:9: error: impossible constraint in ‘asm’ 74 | __asm__ __volatile__ ("cpuid\n\t" \ | ^~~~~~~ cat_test.c:306:17: note: in expansion of macro ‘__cpuid_count’ 306 | __cpuid_count(0x10, 2, eax, ebx, ecx, edx);
Fixes: ae638551ab64 ("selftests/resctrl: Add non-contiguous CBMs CAT test") Reported-by: Muhammad Usama Anjum <[email protected]> Closes: https://lore.kernel.org/lkml/[email protected]/ Reported-by: Ilpo Järvinen <[email protected]> Signed-off-by: Shuah Khan <[email protected]> Acked-by: Reinette Chatre <[email protected]> Reviewed-by: Muhammad Usama Anjum <[email protected]> Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
|
Revision tags: v6.11-rc6, v6.11-rc5, v6.11-rc4, v6.11-rc3, v6.11-rc2, v6.11-rc1, v6.10, v6.10-rc7, v6.10-rc6, v6.10-rc5, v6.10-rc4 |
|
| #
0d66ddb2 |
| 10-Jun-2024 |
Ilpo Järvinen <[email protected]> |
selftests/resctrl: Remove test name comparing from write_bm_pid_to_resctrl()
write_bm_pid_to_resctrl() uses resctrl_val to check test name which is not a good interface generic resctrl FS functions
selftests/resctrl: Remove test name comparing from write_bm_pid_to_resctrl()
write_bm_pid_to_resctrl() uses resctrl_val to check test name which is not a good interface generic resctrl FS functions should provide.
Tests define mongrp when needed. Remove the test name check in write_bm_pid_to_resctrl() to only rely on the mongrp parameter being non-NULL.
Remove write_bm_pid_to_resctrl() resctrl_val parameter and resctrl_val member from the struct resctrl_val_param that are not used anymore. Similarly, remove the test name constants that are no longer used.
Signed-off-by: Ilpo Järvinen <[email protected]> Tested-by: Babu Moger <[email protected]> Reviewed-by: Reinette Chatre <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
| #
48236960 |
| 11-Jun-2024 |
Babu Moger <[email protected]> |
selftests/resctrl: Fix non-contiguous CBM for AMD
The non-contiguous CBM test fails on AMD with: Starting L3_NONCONT_CAT test ... Mounting resctrl to "/sys/fs/resctrl" CPUID output doesn't match 'sp
selftests/resctrl: Fix non-contiguous CBM for AMD
The non-contiguous CBM test fails on AMD with: Starting L3_NONCONT_CAT test ... Mounting resctrl to "/sys/fs/resctrl" CPUID output doesn't match 'sparse_masks' file content! not ok 5 L3_NONCONT_CAT: test
AMD always supports non-contiguous CBM but does not report it via CPUID.
Fix the non-contiguous CBM test to use CPUID to discover non-contiguous CBM support only on Intel.
Fixes: ae638551ab64 ("selftests/resctrl: Add non-contiguous CBMs CAT test") Signed-off-by: Babu Moger <[email protected]> Reviewed-by: Reinette Chatre <[email protected]> Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
|
Revision tags: v6.10-rc3, v6.10-rc2, v6.10-rc1, v6.9, v6.9-rc7, v6.9-rc6, v6.9-rc5, v6.9-rc4, v6.9-rc3, v6.9-rc2, v6.9-rc1, v6.8, v6.8-rc7 |
|
| #
6cd36898 |
| 27-Feb-2024 |
Maciej Wieczor-Retman <[email protected]> |
selftests/resctrl: Move cleanups out of individual tests
Every test calls its cleanup function at the end of it's test function. After the cleanup function pointer is added to the test framework thi
selftests/resctrl: Move cleanups out of individual tests
Every test calls its cleanup function at the end of it's test function. After the cleanup function pointer is added to the test framework this can be simplified to executing the callback function at the end of the generic test running function.
Make test cleanup functions static and call them from the end of run_single_test() from the resctrl_test's cleanup function pointer.
Signed-off-by: Maciej Wieczor-Retman <[email protected]> Reviewed-by: Reinette Chatre <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
| #
8780bc88 |
| 27-Feb-2024 |
Maciej Wieczor-Retman <[email protected]> |
selftests/resctrl: Add cleanup function to test framework
Resctrl selftests use very similar functions to cleanup after themselves. This creates a lot of code duplication. Also not being hooked to t
selftests/resctrl: Add cleanup function to test framework
Resctrl selftests use very similar functions to cleanup after themselves. This creates a lot of code duplication. Also not being hooked to the test framework means that ctrl-c handler isn't aware of what test is currently running and executes all cleanups even though only one is needed.
Add a function pointer to the resctrl_test struct and attach to it cleanup functions from individual tests.
Signed-off-by: Maciej Wieczor-Retman <[email protected]> Reviewed-by: Reinette Chatre <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
|
Revision tags: v6.8-rc6, v6.8-rc5 |
|
| #
ae638551 |
| 16-Feb-2024 |
Maciej Wieczor-Retman <[email protected]> |
selftests/resctrl: Add non-contiguous CBMs CAT test
Add tests for both L2 and L3 CAT to verify the return values generated by writing non-contiguous CBMs don't contradict the reported non-contiguous
selftests/resctrl: Add non-contiguous CBMs CAT test
Add tests for both L2 and L3 CAT to verify the return values generated by writing non-contiguous CBMs don't contradict the reported non-contiguous support information.
Use a logical XOR to confirm return value of write_schemata() and non-contiguous CBMs support information match.
Signed-off-by: Maciej Wieczor-Retman <[email protected]> Reviewed-by: Reinette Chatre <[email protected]> Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
| #
5339792b |
| 16-Feb-2024 |
Ilpo Järvinen <[email protected]> |
selftests/resctrl: Add test groups and name L3 CAT test L3_CAT
To select test to run -t parameter can be used. However, -t cat currently maps to L3 CAT test which will be confusing after more CAT re
selftests/resctrl: Add test groups and name L3 CAT test L3_CAT
To select test to run -t parameter can be used. However, -t cat currently maps to L3 CAT test which will be confusing after more CAT related tests will be added.
Allow selecting tests as groups and call L3 CAT test "L3_CAT", "CAT" group will enable all CAT related tests.
Signed-off-by: Ilpo Järvinen <[email protected]> Signed-off-by: Maciej Wieczor-Retman <[email protected]> Reviewed-by: Reinette Chatre <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
|
Revision tags: v6.8-rc4, v6.8-rc3, v6.8-rc2, v6.8-rc1, v6.7, v6.7-rc8, v6.7-rc7, v6.7-rc6 |
|
| #
ca160887 |
| 15-Dec-2023 |
Ilpo Järvinen <[email protected]> |
selftests/resctrl: Pass write_schemata() resource instead of test name
write_schemata() takes the test name as an argument and determines the relevant resource based on the test name. Such mapping f
selftests/resctrl: Pass write_schemata() resource instead of test name
write_schemata() takes the test name as an argument and determines the relevant resource based on the test name. Such mapping from name to resource does not really belong to resctrlfs.c that should provide only generic, test-independent functions.
Pass the resource stored in the test information structure to write_schemata() instead of the test name. The new API is also more flexible as it enables to use write_schemata() for more than one resource within a test.
While touching the sprintf(), move the unnecessary %c that is always '=' directly into the format string.
Signed-off-by: Ilpo Järvinen <[email protected]> Reviewed-by: Reinette Chatre <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
| #
c603ff5b |
| 15-Dec-2023 |
Ilpo Järvinen <[email protected]> |
selftests/resctrl: Introduce generalized test framework
Each test currently has a "run test" function in per test file and another resctrl_tests.c. The functions in resctrl_tests.c are almost identi
selftests/resctrl: Introduce generalized test framework
Each test currently has a "run test" function in per test file and another resctrl_tests.c. The functions in resctrl_tests.c are almost identical.
Generalize the one in resctrl_tests.c such that it can be shared between all of the tests. It makes adding new tests easier and removes the per test if () forests.
Also add comment to CPU vendor IDs that they must be defined as bits for a bitmask.
Signed-off-by: Ilpo Järvinen <[email protected]> Reviewed-by: Reinette Chatre <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
| #
15f29882 |
| 15-Dec-2023 |
Ilpo Järvinen <[email protected]> |
selftests/resctrl: Create struct for input parameters
resctrl_tests reads a set of parameters and passes them individually for each tests which causes variations in the call signature between the te
selftests/resctrl: Create struct for input parameters
resctrl_tests reads a set of parameters and passes them individually for each tests which causes variations in the call signature between the tests.
Add struct input_params to hold all input parameters. It can be easily passed to every test without varying the call signature.
Signed-off-by: Ilpo Järvinen <[email protected]> Reviewed-by: Reinette Chatre <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
| #
6c8cb747 |
| 15-Dec-2023 |
Ilpo Järvinen <[email protected]> |
selftests/resctrl: Restore the CPU affinity after CAT test
CAT test does not reset the CPU affinity after the benchmark. This is relatively harmless as is because CAT test is the last benchmark to r
selftests/resctrl: Restore the CPU affinity after CAT test
CAT test does not reset the CPU affinity after the benchmark. This is relatively harmless as is because CAT test is the last benchmark to run, however, more tests may be added later.
Store the CPU affinity the first time taskset_benchmark() is run and add taskset_restore() which the test can call to reset the CPU mask to its original value.
Signed-off-by: Ilpo Järvinen <[email protected]> Reviewed-by: Reinette Chatre <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
| #
205de6dd |
| 15-Dec-2023 |
Ilpo Järvinen <[email protected]> |
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 memo
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 <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]> Reviewed-by: Reinette Chatre <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
| #
2892731e |
| 15-Dec-2023 |
Ilpo Järvinen <[email protected]> |
selftests/resctrl: Open perf fd before start & add error handling
Perf fd (pe_fd) is opened, reset, and enabled during every test the CAT selftest runs. Also, ioctl(pe_fd, ...) calls are not error c
selftests/resctrl: Open perf fd before start & add error handling
Perf fd (pe_fd) is opened, reset, and enabled during every test the CAT selftest runs. Also, ioctl(pe_fd, ...) calls are not error checked even if ioctl() could return an error.
Open perf fd only once before the tests and only reset and enable the counter within the test loop. Add error checking to pe_fd ioctl() calls.
Signed-off-by: Ilpo Järvinen <[email protected]> Reviewed-by: Reinette Chatre <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
| #
433f437b |
| 15-Dec-2023 |
Ilpo Järvinen <[email protected]> |
selftests/resctrl: Move cat_val() to cat_test.c and rename to cat_test()
The main CAT test function is called cat_val() and resides in cache.c which is illogical.
Rename the function to cat_test()
selftests/resctrl: Move cat_val() to cat_test.c and rename to cat_test()
The main CAT test function is called cat_val() and resides in cache.c which is illogical.
Rename the function to cat_test() and move it into cat_test.c.
Signed-off-by: Ilpo Järvinen <[email protected]> Reviewed-by: Reinette Chatre <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
| #
33403bc7 |
| 15-Dec-2023 |
Ilpo Järvinen <[email protected]> |
selftests/resctrl: Remove unnecessary __u64 -> unsigned long conversion
Perf counters are __u64 but the code converts them to unsigned long before printing them out.
Remove unnecessary type convers
selftests/resctrl: Remove unnecessary __u64 -> unsigned long conversion
Perf counters are __u64 but the code converts them to unsigned long before printing them out.
Remove unnecessary type conversion and retain the perf originating value as __u64.
Signed-off-by: Ilpo Järvinen <[email protected]> Reviewed-by: Reinette Chatre <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
| #
5caf1b64 |
| 15-Dec-2023 |
Ilpo Järvinen <[email protected]> |
selftests/resctrl: Split show_cache_info() to test specific and generic parts
show_cache_info() calculates results and provides generic cache information. This makes it hard to alter pass/fail condi
selftests/resctrl: Split show_cache_info() to test specific and generic parts
show_cache_info() calculates results and provides generic cache information. This makes it hard to alter pass/fail conditions.
Separate the test specific checks into CAT and CMT test files and leave only the generic information part into show_cache_info().
Signed-off-by: Ilpo Järvinen <[email protected]> Reviewed-by: Reinette Chatre <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
| #
b6dfac94 |
| 15-Dec-2023 |
Ilpo Järvinen <[email protected]> |
selftests/resctrl: Exclude shareable bits from schemata in CAT test
CAT test doesn't take shareable bits into account, i.e., the test might be sharing cache with some devices (e.g., graphics).
Intr
selftests/resctrl: Exclude shareable bits from schemata in CAT test
CAT test doesn't take shareable bits into account, i.e., the test might be sharing cache with some devices (e.g., graphics).
Introduce get_mask_no_shareable() and use it to provision an environment for CAT test where the allocated LLC is isolated better. Excluding shareable_bits may create hole(s) into the cbm_mask, thus add a new helper count_contiguous_bits() to find the longest contiguous set of CBM bits.
create_bit_mask() is needed by an upcoming CAT test rewrite so make it available in resctrl.h right away.
Signed-off-by: Ilpo Järvinen <[email protected]> Reviewed-by: Reinette Chatre <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
| #
19e94a23 |
| 15-Dec-2023 |
Ilpo Järvinen <[email protected]> |
selftests/resctrl: Create cache_portion_size() helper
CAT and CMT tests calculate size of the cache portion for the n-bits cache allocation on their own.
Add cache_portion_size() helper that calcul
selftests/resctrl: Create cache_portion_size() helper
CAT and CMT tests calculate size of the cache portion for the n-bits cache allocation on their own.
Add cache_portion_size() helper that calculates size of the cache portion for the given number of bits and use it to replace the existing span calculations. This also prepares for the new CAT test that will need to determine the size of the cache portion also during results processing.
Rename also 'cache_size' local variables to 'cache_total_size' to prevent misinterpretations.
Signed-off-by: Ilpo Järvinen <[email protected]> Reviewed-by: Reinette Chatre <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
| #
4b357e2a |
| 15-Dec-2023 |
Ilpo Järvinen <[email protected]> |
selftests/resctrl: Refactor get_cbm_mask() and rename to get_full_cbm()
Callers of get_cbm_mask() are required to pass a string into which the capacity bitmask (CBM) is read. Neither CAT nor CMT tes
selftests/resctrl: Refactor get_cbm_mask() and rename to get_full_cbm()
Callers of get_cbm_mask() are required to pass a string into which the capacity bitmask (CBM) is read. Neither CAT nor CMT tests need the bitmask as string but just convert it into an unsigned long value.
Another limitation is that the bit mask reader can only read .../cbm_mask files.
Generalize the bit mask reading function into get_bit_mask() such that it can be used to handle other files besides the .../cbm_mask and handles the unsigned long conversion within get_bit_mask() using fscanf(). Change get_cbm_mask() to use get_bit_mask() and rename it to get_full_cbm() to better indicate what the function does.
Return error from get_full_cbm() if the bitmask is zero for some reason because it makes the code more robust as the selftests naturally assume the bitmask has some bits.
Also mark cache_type const while at it and remove useless comments that are related to processing of CBM bits.
Co-developed-by: Fenghua Yu <[email protected]> Signed-off-by: Fenghua Yu <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]> Reviewed-by: Reinette Chatre <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
| #
c90fba60 |
| 15-Dec-2023 |
Ilpo Järvinen <[email protected]> |
selftests/resctrl: Return -1 instead of errno on error
A number of functions in the resctrl selftests return errno. It is problematic because errno is positive which is often counterintuitive. Also,
selftests/resctrl: Return -1 instead of errno on error
A number of functions in the resctrl selftests return errno. It is problematic because errno is positive which is often counterintuitive. Also, every site returning errno prints the error message already with ksft_perror() so there is not much added value in returning the precise error code.
Simply convert all places returning errno to return -1 that is typical userspace error code in case of failures.
While at it, improve resctrl_val() comment to state that 0 means the test was run (either pass or fail).
Signed-off-by: Ilpo Järvinen <[email protected]> Reviewed-by: Reinette Chatre <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
| #
cc8ff7f5 |
| 15-Dec-2023 |
Ilpo Järvinen <[email protected]> |
selftests/resctrl: Convert perror() to ksft_perror() or ksft_print_msg()
The resctrl selftest code contains a number of perror() calls. Some of them come with hash character and some don't. The ksel
selftests/resctrl: Convert perror() to ksft_perror() or ksft_print_msg()
The resctrl selftest code contains a number of perror() calls. Some of them come with hash character and some don't. The kselftest framework provides ksft_perror() that is compatible with test output formatting so it should be used instead of adding custom hash signs.
Some perror() calls are too far away from anything that sets error. For those call sites, ksft_print_msg() must be used instead.
Convert perror() to ksft_perror() or ksft_print_msg().
Other related changes: - Remove hash signs - Remove trailing stops & newlines from ksft_perror() - Add terminating newlines for converted ksft_print_msg() - Use consistent capitalization - Small fixes/tweaks to typos & grammar of the messages - Extract error printing out of PARENT_EXIT() to be able to differentiate
Signed-off-by: Ilpo Järvinen <[email protected]> Reviewed-by: Reinette Chatre <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
|
Revision tags: v6.7-rc5, v6.7-rc4, v6.7-rc3, v6.7-rc2, v6.7-rc1, v6.6, v6.6-rc7, v6.6-rc6, v6.6-rc5 |
|
| #
3aff5146 |
| 02-Oct-2023 |
Ilpo Järvinen <[email protected]> |
selftests/resctrl: Extend signal handler coverage to unmount on receiving signal
Unmounting resctrl FS has been moved into the per test functions in resctrl_tests.c by commit caddc0fbe495 ("selftest
selftests/resctrl: Extend signal handler coverage to unmount on receiving signal
Unmounting resctrl FS has been moved into the per test functions in resctrl_tests.c by commit caddc0fbe495 ("selftests/resctrl: Move resctrl FS mount/umount to higher level"). In case a signal (SIGINT, SIGTERM, or SIGHUP) is received, the running selftest is aborted by ctrlc_handler() which then unmounts resctrl fs before exiting. The current section between signal_handler_register() and signal_handler_unregister(), however, does not cover the entire duration when resctrl FS is mounted.
Move signal_handler_register() and signal_handler_unregister() calls from per test files into resctrl_tests.c to properly unmount resctrl fs. In order to not add signal_handler_register()/unregister() n times, create helpers test_prepare() and test_cleanup().
Do not call ksft_exit_fail_msg() in test_prepare() but only in the per test function to keep the control flow cleaner without adding calls to exit() deep into the call chain.
Adjust child process kill() call in ctrlc_handler() to only be invoked if the child was already forked.
Fixes: caddc0fbe495 ("selftests/resctrl: Move resctrl FS mount/umount to higher level") Signed-off-by: Ilpo Järvinen <[email protected]> Tested-by: Shaopeng Tan <[email protected]> Reviewed-by: Shaopeng Tan <[email protected]> Reviewed-by: Reinette Chatre <[email protected]> Cc: <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
|
Revision tags: v6.6-rc4, v6.6-rc3, v6.6-rc2, v6.6-rc1 |
|
| #
b1a901e0 |
| 04-Sep-2023 |
Ilpo Järvinen <[email protected]> |
selftests/resctrl: Simplify span lifetime
struct resctrl_val_param contains span member. resctrl_val(), however, never uses it because the value of span is embedded into the default benchmark comman
selftests/resctrl: Simplify span lifetime
struct resctrl_val_param contains span member. resctrl_val(), however, never uses it because the value of span is embedded into the default benchmark command and parsed from it by run_benchmark().
Remove span from resctrl_val_param. Provide DEFAULT_SPAN for the code that needs it. CMT and CAT tests communicate span that is different from the DEFAULT_SPAN between their internal functions which is converted into passing it directly as a parameter.
Signed-off-by: Ilpo Järvinen <[email protected]> Tested-by: Shaopeng Tan <[email protected]> Reviewed-by: Reinette Chatre <[email protected]> Reviewed-by: Shaopeng Tan <[email protected]> Reviewed-by: "Wieczor-Retman, Maciej" <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
|
Revision tags: v6.5, v6.5-rc7, v6.5-rc6, v6.5-rc5, v6.5-rc4, v6.5-rc3 |
|
| #
3dad011b |
| 17-Jul-2023 |
Ilpo Järvinen <[email protected]> |
selftests/resctrl: Pass the real number of tests to show_cache_info()
Results include warm-up test which is discarded before passing the sum to show_cache_info(). show_cache_info() handles this by s
selftests/resctrl: Pass the real number of tests to show_cache_info()
Results include warm-up test which is discarded before passing the sum to show_cache_info(). show_cache_info() handles this by subtracting one from the number of tests in divisor. It is a trappy construct to have sum and number of tests parameters to disagree like this.
A more logical place for subtracting the skipped tests is where the sum is calculated so move it there. Pass the correct number of tests to show_cache_info() so it can be used directly as the divisor for calculating the average.
Signed-off-by: Ilpo Järvinen <[email protected]> Reviewed-by: Reinette Chatre <[email protected]> Tested-by: Babu Moger <[email protected]> Tested-by: Shaopeng Tan (Fujitsu) <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
| #
85b73447 |
| 17-Jul-2023 |
Ilpo Järvinen <[email protected]> |
selftests/resctrl: Move CAT/CMT test global vars to function they are used in
CAT and CMT tests have count_of_bits, long_mask, cbm_mask, and cache_size global variables that can be moved into the so
selftests/resctrl: Move CAT/CMT test global vars to function they are used in
CAT and CMT tests have count_of_bits, long_mask, cbm_mask, and cache_size global variables that can be moved into the sole using function.
Make the global variables local variables of the relevant function to scope them better.
While at it, move cache_size initialization into the declaration line.
Signed-off-by: Ilpo Järvinen <[email protected]> Reviewed-by: Reinette Chatre <[email protected]> Tested-by: Babu Moger <[email protected]> Tested-by: Shaopeng Tan (Fujitsu) <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|