linux-stable/kernel/rcu
Paul E. McKenney 1afb95fee0 torture: Maintain torture-specific set of CPUs-online books
The TREE01 rcutorture scenario intentionally creates confusion as to the
number of available CPUs by specifying the "maxcpus=8 nr_cpus=43" kernel
boot parameters.  This can disable rcutorture's load shedding, which
currently uses num_online_cpus(), which would count the extra 35 CPUs.
However, the rcutorture guest OS will be provisioned with only 8 CPUs,
which means that rcutorture will present full load even when all but one
of the original 8 CPUs are offline.  This can result in spurious errors
due to extreme overloading of that single remaining CPU.

This commit therefore keeps a separate set of books on the number of
usable online CPUs, so that torture_num_online_cpus() is used for load
shedding instead of num_online_cpus().  Note that initial sizing must
use num_online_cpus() because torture_num_online_cpus() will return
NR_CPUS until shortly after torture_onoff_init() is invoked.

Reported-by: Frederic Weisbecker <frederic@kernel.org>
[ paulmck: Apply feedback from kernel test robot. ]
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2021-01-06 17:17:22 -08:00
..
Kconfig rcu: Clarify nocb kthreads naming in RCU_NOCB_CPU config 2020-11-19 19:37:16 -08:00
Kconfig.debug Merge branch 'strictgp.2020.08.24a' into HEAD 2020-09-03 09:47:42 -07:00
Makefile rcuperf: Change rcuperf to rcuscale 2020-08-24 18:39:24 -07:00
rcu.h rcutorture: Make grace-period kthread report match RCU flavor being tested 2020-11-02 17:12:43 -08:00
rcu_segcblist.c rcu/segcblist: Prevent useless GP start if no CBs to accelerate 2020-09-03 09:39:59 -07:00
rcu_segcblist.h rcu: Implement rcu_segcblist_is_offloaded() config dependent 2020-11-19 19:37:16 -08:00
rcuscale.c rcuscale: Prevent hangs for invalid arguments 2020-11-06 17:13:51 -08:00
rcutorture.c torture: Maintain torture-specific set of CPUs-online books 2021-01-06 17:17:22 -08:00
refscale.c torture: Make refscale throttle high-rate printk()s 2021-01-06 17:17:20 -08:00
srcutiny.c srcu: Provide polling interfaces for Tiny SRCU grace periods 2021-01-04 13:53:38 -08:00
srcutree.c srcu: Add comment explaining cookie overflow/wrap 2021-01-04 13:53:39 -08:00
sync.c rcu/sync: Simplify the state machine 2019-05-28 09:05:23 -07:00
tasks.h rcu-tasks: Make the units of ->init_fract be jiffies 2020-11-06 17:17:59 -08:00
tiny.c rcu: Rename *_kfree_callback/*_kfree_rcu_offset/kfree_call_* 2020-06-29 11:59:25 -07:00
tree.c Scheduler updates: 2020-12-14 18:29:11 -08:00
tree.h rcu: Prevent lockdep-RCU splats on lock acquisition/release 2020-11-19 19:37:17 -08:00
tree_exp.h rcu: Initialize at declaration time in rcu_exp_handler() 2020-08-24 18:36:03 -07:00
tree_plugin.h rcu: Do not report strict GPs for outgoing CPUs 2020-11-19 19:37:17 -08:00
tree_stall.h rcu: Panic after fixed number of stalls 2020-11-19 19:37:16 -08:00
update.c Merge tag 'core-rcu-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2020-10-18 14:34:50 -07:00