torture: Make jitter.sh handle large systems
authorPaul E. McKenney <paulmck@kernel.org>
Wed, 10 Feb 2021 21:25:58 +0000 (13:25 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 8 Mar 2021 22:21:41 +0000 (14:21 -0800)
commit8126c57f00cea3502a017b7c76df1fac58f89e88
treec81e5682d92d418dff541a4d5d8ea20185a1224c
parent7308e0240410d3644c9d7cc6263079a58e3effeb
torture: Make jitter.sh handle large systems

The current jitter.sh script expects cpumask bits to fit into whatever
the awk interpreter uses for an integer, which clearly does not hold for
even medium-sized systems these days.  This means that on a large system,
only the first 32 or 64 CPUs (depending) are subjected to jitter.sh
CPU-time perturbations.  This commit therefore computes a given CPU's
cpumask using text manipulation rather than arithmetic shifts.

Reported-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/testing/selftests/rcutorture/bin/jitter.sh