|
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 |
|
| #
d6d35d0b |
| 16-Dec-2024 |
Maciej Wieczor-Retman <[email protected]> |
selftests/resctrl: Discover SNC kernel support and adjust messages
Resctrl selftest prints a message on test failure that Sub-Numa Clustering (SNC) could be enabled and points the user to check thei
selftests/resctrl: Discover SNC kernel support and adjust messages
Resctrl selftest prints a message on test failure that Sub-Numa Clustering (SNC) could be enabled and points the user to check their BIOS settings. No actual check is performed before printing that message so it is not very accurate in pinpointing a problem.
When there is SNC support for kernel's resctrl subsystem and SNC is enabled then sub node files are created for each node in the resctrlfs. The sub node files exist in each regular node's L3 monitoring directory. The reliable path to check for existence of sub node files is /sys/fs/resctrl/mon_data/mon_L3_00/mon_sub_L3_00.
Add helper that checks for mon_sub_L3_00 existence.
Correct old messages to account for kernel support of SNC in resctrl.
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.13-rc3, v6.13-rc2, v6.13-rc1, v6.12, v6.12-rc7, v6.12-rc6, v6.12-rc5 |
|
| #
295b8984 |
| 24-Oct-2024 |
Reinette Chatre <[email protected]> |
selftests/resctrl: Keep results from first test run
The resctrl selftests drop the results from every first test run to avoid (per comment) "inaccurate due to monitoring setup transition phase" data
selftests/resctrl: Keep results from first test run
The resctrl selftests drop the results from every first test run to avoid (per comment) "inaccurate due to monitoring setup transition phase" data. Previously inaccurate data resulted from workloads needing some time to "settle" and also the measurements themselves to account for earlier measurements to measure across needed timeframe.
commit da50de0a92f3 ("selftests/resctrl: Calculate resctrl FS derived mem bw over sleep(1) only")
ensured that measurements accurately measure just the time frame of interest. The default "fill_buf" benchmark since separated the buffer prepare phase from the benchmark run phase reducing the need for the tests themselves to accommodate the benchmark's "settle" time.
With these enhancements there are no remaining portions needing to "settle" and the first test run can contribute to measurements.
Signed-off-by: Reinette Chatre <[email protected]> Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
| #
e958c21e |
| 24-Oct-2024 |
Reinette Chatre <[email protected]> |
selftests/resctrl: Make benchmark parameter passing robust
The benchmark used during the CMT, MBM, and MBA tests can be provided by the user via (-b) parameter, if not provided the default "fill_buf
selftests/resctrl: Make benchmark parameter passing robust
The benchmark used during the CMT, MBM, and MBA tests can be provided by the user via (-b) parameter, if not provided the default "fill_buf" benchmark is used. The user is additionally able to override any of the "fill_buf" default parameters when running the tests with "-b fill_buf <fill_buf parameters>".
The "fill_buf" parameters are managed as an array of strings. Using an array of strings is complex because it requires transformations to/from strings at every producer and consumer. This is made worse for the individual tests where the default benchmark parameters values may not be appropriate and additional data wrangling is required. For example, the CMT test duplicates the entire array of strings in order to replace one of the parameters.
More issues appear when combining the usage of an array of strings with the use case of user overriding default parameters by specifying "-b fill_buf <parameters>". This use case is fragile with opportunities to trigger a SIGSEGV because of opportunities for NULL pointers to exist in the array of strings. For example, by running below (thus by specifying "fill_buf" should be used but all parameters are NULL): $ sudo resctrl_tests -t mbm -b fill_buf
Replace the "array of strings" parameters used for "fill_buf" with new struct fill_buf_param that contains the "fill_buf" parameters that can be used directly without transformations to/from strings. Two instances of struct fill_buf_param may exist at any point in time: * If the user provides new parameters to "fill_buf", the user parameter structure (struct user_params) will point to a fully initialized and immutable struct fill_buf_param containing the user provided parameters. * If "fill_buf" is the benchmark that should be used by a test, then the test parameter structure (struct resctrl_val_param) will point to a fully initialized struct fill_buf_param. The latter may contain (a) the user provided parameters verbatim, (b) user provided parameters adjusted to be appropriate for the test, or (c) the default parameters for "fill_buf" that is appropriate for the test if the user did not provide "fill_buf" parameters nor an alternate benchmark.
The existing behavior of CMT test is to use test defined value for the buffer size even if the user provides another value via command line. This behavior is maintained since the test requires that the buffer size matches the size of the cache allocated, and the amount of cache allocated can instead be changed by the user with the "-n" command line parameter.
Signed-off-by: Reinette Chatre <[email protected]> Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
|
Revision tags: v6.12-rc4, v6.12-rc3, v6.12-rc2, v6.12-rc1, v6.11, v6.11-rc7, 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 ...
|
| #
f58e66be |
| 10-Jun-2024 |
Ilpo Järvinen <[email protected]> |
selftests/resctrl: Remove mongrp from CMT test
The CMT selftest instantiates a monitor group to read LLC occupancy. Since the test also creates a control group, it is unnecessary to create another o
selftests/resctrl: Remove mongrp from CMT test
The CMT selftest instantiates a monitor group to read LLC occupancy. Since the test also creates a control group, it is unnecessary to create another one for monitoring because control groups already provide monitoring too.
Remove the unnecessary monitor group from the CMT selftest.
Suggested-by: Reinette Chatre <[email protected]> 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 ...
|
| #
aef5efa6 |
| 10-Jun-2024 |
Ilpo Järvinen <[email protected]> |
selftests/resctrl: Add ->init() callback into resctrl_val_param
The struct resctrl_val_param is there to customize behavior inside resctrl_val() which is currently not used to full extent and there
selftests/resctrl: Add ->init() callback into resctrl_val_param
The struct resctrl_val_param is there to customize behavior inside resctrl_val() which is currently not used to full extent and there are number of strcmp()s for test name in resctrl_val done by resctrl_val().
Create ->init() hook into the struct resctrl_val_param to cleanly do per test initialization.
Remove also unused branches to setup paths and the related #defines for CMT test.
While touching kerneldoc, make the adjacent line consistent with the newly added form (callback vs call back).
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 ...
|
| #
0e251816 |
| 10-Jun-2024 |
Ilpo Järvinen <[email protected]> |
selftests/resctrl: Add ->measure() callback to resctrl_val_param
The measurement done in resctrl_val() varies depending on test type. The decision for how to measure is decided based on the string c
selftests/resctrl: Add ->measure() callback to resctrl_val_param
The measurement done in resctrl_val() varies depending on test type. The decision for how to measure is decided based on the string compare to test name which is quite inflexible.
Add ->measure() callback into the struct resctrl_val_param to allow each test to provide necessary code as a function which simplifies what resctrl_val() has to do.
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 ...
|
|
Revision tags: v6.10-rc3, v6.10-rc2, v6.10-rc1, v6.9 |
|
| #
14d28ec6 |
| 08-May-2024 |
John Hubbard <[email protected]> |
selftests/resctrl: fix clang build warnings related to abs(), labs() calls
When building with clang, via:
make LLVM=1 -C tools/testing/selftests
...two types of warnings occur:
warning: a
selftests/resctrl: fix clang build warnings related to abs(), labs() calls
When building with clang, via:
make LLVM=1 -C tools/testing/selftests
...two types of warnings occur:
warning: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value
warning: taking the absolute value of unsigned type 'unsigned long' has no effect
Fix these by:
a) using labs() in place of abs(), when long integers are involved, and
b) Change to use signed integer data types, in places where subtraction is used (and could end up with negative values).
c) Remove a duplicate abs() call in cmt_test.c.
Cc: Ilpo Järvinen <[email protected]> Reviewed-by: Reinette Chatre <[email protected]> Signed-off-by: John Hubbard <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
|
Revision tags: 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 |
|
| #
00616416 |
| 16-Feb-2024 |
Maciej Wieczor-Retman <[email protected]> |
selftests/resctrl: Split validate_resctrl_feature_request()
validate_resctrl_feature_request() is used to test both if a resource is present in the info directory, and if a passed monitoring feature
selftests/resctrl: Split validate_resctrl_feature_request()
validate_resctrl_feature_request() is used to test both if a resource is present in the info directory, and if a passed monitoring feature is present in the mon_features file.
Refactor validate_resctrl_feature_request() into two smaller functions that each accomplish one check to give feature checking more granularity: - Resource directory presence in the /sys/fs/resctrl/info directory. - Feature name presence in the /sys/fs/resctrl/info/<RESOURCE>/mon_features file.
Signed-off-by: Maciej Wieczor-Retman <[email protected]> Reviewed-by: Ilpo Järvinen <[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 ...
|
| #
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 ...
|
| #
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 |
|
| #
030b48fb |
| 02-Oct-2023 |
Ilpo Järvinen <[email protected]> |
selftests/resctrl: Remove duplicate feature check from CMT test
The test runner run_cmt_test() in resctrl_tests.c checks for CMT feature and does not run cmt_resctrl_val() if CMT is not supported. T
selftests/resctrl: Remove duplicate feature check from CMT test
The test runner run_cmt_test() in resctrl_tests.c checks for CMT feature and does not run cmt_resctrl_val() if CMT is not supported. Then cmt_resctrl_val() also check is CMT is supported.
Remove the duplicated feature check for CMT from cmt_resctrl_val().
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]> 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 |
|
| #
e33cb570 |
| 04-Sep-2023 |
Ilpo Järvinen <[email protected]> |
selftests/resctrl: Make benchmark command const and build it with pointers
Benchmark command is used in multiple tests so it should not be mutated by the tests but CMT test alters span argument. Due
selftests/resctrl: Make benchmark command const and build it with pointers
Benchmark command is used in multiple tests so it should not be mutated by the tests but CMT test alters span argument. Due to the order of tests (CMT test runs last), mutating the span argument in CMT test does not trigger any real problems currently.
Mark benchmark_cmd strings as const and setup the benchmark command using pointers. Because the benchmark command becomes const, the input arguments can be used directly. Besides being simpler, using the input arguments directly also removes the internal size restriction.
CMT test has to create a copy of the benchmark command before altering the benchmark command.
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]> Reviewed-by: "Wieczor-Retman, Maciej" <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
| #
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 ...
|
| #
8ee592a6 |
| 17-Jul-2023 |
Ilpo Järvinen <[email protected]> |
selftests/resctrl: Don't use variable argument list for ->setup()
struct resctrl_val_param has ->setup() function that accepts variable argument list. All test cases use only 1 argument as input and
selftests/resctrl: Don't use variable argument list for ->setup()
struct resctrl_val_param has ->setup() function that accepts variable argument list. All test cases use only 1 argument as input and it's the struct resctrl_val_param pointer.
Instead of variable argument list, directly pass struct resctrl_val_param pointer as the only parameter to ->setup().
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]> Tested-by: Babu Moger <[email protected]> Tested-by: Shaopeng Tan (Fujitsu) <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|