diff options
author | Reinette Chatre <reinette.chatre@intel.com> | 2024-10-25 00:18:43 +0300 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2024-11-05 03:02:02 +0300 |
commit | efffa8c40166af680959c030a815afa8d06af66a (patch) | |
tree | b0c8c70bc3e873591ddc33a1c41c850ed1d95c05 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 46058430fc5d39c114f7e1b9c6ff14c9f41bd531 (diff) | |
download | linux-efffa8c40166af680959c030a815afa8d06af66a.tar.xz |
selftests/resctrl: Make wraparound handling obvious
Within mba_setup() the programmed bandwidth delay value starts
at the maximum (100, or rather ALLOCATION_MAX) and progresses
towards ALLOCATION_MIN by decrementing with ALLOCATION_STEP.
The programmed bandwidth delay should never be negative, so
representing it with an unsigned int is most appropriate. This
may introduce confusion because of the "allocation > ALLOCATION_MAX"
check used to check wraparound of the subtraction.
Modify the mba_setup() flow to start at the minimum, ALLOCATION_MIN,
and incrementally, with ALLOCATION_STEP steps, adjust the
bandwidth delay value. This avoids wraparound while making the purpose
of "allocation > ALLOCATION_MAX" clear and eliminates the
need for the "allocation < ALLOCATION_MIN" check.
Reported-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Closes: https://lore.kernel.org/lkml/1903ac13-5c9c-ef8d-78e0-417ac34a971b@linux.intel.com/
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/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions