scftorture: Implement weighted primitive selection
authorPaul E. McKenney <paulmck@kernel.org>
Fri, 26 Jun 2020 00:05:58 +0000 (17:05 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Tue, 25 Aug 2020 01:38:32 +0000 (18:38 -0700)
commit5022b8ac608f8b80b042a8041fe2738c4b9ea8cf
treec104e0a1205a5d4a04229aca2bbb7c8542dc7aa4
parent80c9476e683ec37ba45fd8e6a5c5081bea207e1a
scftorture: Implement weighted primitive selection

This commit uses the scftorture.weight* kernel parameters to randomly
chooses between smp_call_function_single(), smp_call_function_many(),
and smp_call_function().  For each variant, it also randomly chooses
whether to invoke it synchronously (wait=1) or asynchronously (wait=0).
The percentage weighting for each option are dumped to the console log
(search for "scf_sel_dump").

This accumulates statistics, which a later commit will dump out at the
end of the run.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/scftorture.c