diff options
author | Reinette Chatre <reinette.chatre@intel.com> | 2024-10-24 23:18:51 +0200 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2024-11-05 01:02:03 +0100 |
commit | 295b898426d8fb5b79672d1dae358ca8070f2196 (patch) | |
tree | 18920a04a8f77a3c9ed2032962351678fff4043a /tools/testing/selftests/resctrl/cmt_test.c | |
parent | selftests/resctrl: Do not compare performance counters and resctrl at low ban... (diff) | |
download | linux-295b898426d8fb5b79672d1dae358ca8070f2196.tar.xz linux-295b898426d8fb5b79672d1dae358ca8070f2196.zip |
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 <reinette.chatre@intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/resctrl/cmt_test.c')
-rw-r--r-- | tools/testing/selftests/resctrl/cmt_test.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/testing/selftests/resctrl/cmt_test.c b/tools/testing/selftests/resctrl/cmt_test.c index 4c3cf2c25a38..3bbf3042fb06 100644 --- a/tools/testing/selftests/resctrl/cmt_test.c +++ b/tools/testing/selftests/resctrl/cmt_test.c @@ -99,14 +99,13 @@ static int check_results(struct resctrl_val_param *param, size_t span, int no_of } /* Field 3 is llc occ resc value */ - if (runs > 0) - sum_llc_occu_resc += strtoul(token_array[3], NULL, 0); + sum_llc_occu_resc += strtoul(token_array[3], NULL, 0); runs++; } fclose(fp); return show_results_info(sum_llc_occu_resc, no_of_bits, span, - MAX_DIFF, MAX_DIFF_PERCENT, runs - 1, true); + MAX_DIFF, MAX_DIFF_PERCENT, runs, true); } static void cmt_test_cleanup(void) |