diff options
author | Madadi Vineeth Reddy <[email protected]> | 2024-06-28 12:48:21 +0530 |
---|---|---|
committer | Namhyung Kim <[email protected]> | 2024-06-28 12:55:46 -0700 |
commit | a7cacaa0880e427642cb305010ea2a62c7b0e1ac (patch) | |
tree | 0989b7312e807f5be868b29b012c66592a64bc50 /scripts/rustdoc_test_builder.rs | |
parent | 5484fd2767e4b31ca3320fe1375c37922c132c52 (diff) |
perf sched replay: Fix -r/--repeat command line option for infinity
Currently, the -r/--repeat option accepts values from 0 and complains
for -1. The help section specifies:
-r, --repeat <n> repeat the workload replay N times (-1: infinite)
The -r -1 option raises an error because replay_repeat is defined as
an unsigned int.
In the current implementation, the workload is repeated n times when
-r <n> is used, except when n is 0.
When -r is set to 0, the workload is also repeated once. This happens
because when -r=0, the run_one_test function is not called. (Note that
mutex unlocking, which is essential for child threads spawned to emulate
the workload, happens in run_one_test.) However, mutex unlocking is
still performed in the destroy_tasks function. Thus, -r=0 results in the
workload running once coincidentally.
To clarify and maintain the existing logic for -r >= 1 (which runs the
workload the specified number of times) and to fix the issue with infinite
runs, make -r=0 perform an infinite run.
Reviewed-by: James Clark <[email protected]>
Signed-off-by: Madadi Vineeth Reddy <[email protected]>
Cc: Athira Rajeev <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Namhyung Kim <[email protected]>
Diffstat (limited to 'scripts/rustdoc_test_builder.rs')
0 files changed, 0 insertions, 0 deletions