]> git.baikalelectronics.ru Git - kernel.git/commit
torture: Hoist calls to lscpu to higher-level kvm.sh script
authorPaul E. McKenney <paulmck@kernel.org>
Mon, 25 Nov 2019 22:33:28 +0000 (14:33 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 9 Dec 2019 21:00:30 +0000 (13:00 -0800)
commitee47f21a4133341916d996c1bdb96ff31066d626
treeed9b4e7fa0edab8807029f98ed04bb6f080d5bd9
parenta04dcb2c27efd08719b7ab82b27ed8e88494308d
torture: Hoist calls to lscpu to higher-level kvm.sh script

On some kernels, concurrent calls to the lscpu command result in severe
slowdowns.  For example, on v4.16, a single lscpu invocation takes about
two milliseconds, four concurrent invocations more than two seconds,
and 16 concurrent invocations more than 20 seconds.  Given that the only
goal is to learn the number of CPUs, invoking lscpu but once suffices.
This commit therefore invokes lscpu early in kvm.sh execution, setting
the initial value of the TORTURE_ALLOTED_CPUS environment variable.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
tools/testing/selftests/rcutorture/bin/kvm.sh