aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/syscall-counts.py
diff options
context:
space:
mode:
authorReinette Chatre <[email protected]>2024-10-24 14:18:43 -0700
committerShuah Khan <[email protected]>2024-11-04 17:02:02 -0700
commitefffa8c40166af680959c030a815afa8d06af66a (patch)
treeb0c8c70bc3e873591ddc33a1c41c850ed1d95c05 /tools/perf/scripts/python/syscall-counts.py
parent46058430fc5d39c114f7e1b9c6ff14c9f41bd531 (diff)
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 <[email protected]> Closes: https://lore.kernel.org/lkml/[email protected]/ Signed-off-by: Reinette Chatre <[email protected]> Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions