diff options
author | Paul E. McKenney <paulmck@kernel.org> | 2020-04-24 21:21:40 +0300 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2020-06-29 22:01:44 +0300 |
commit | 4a5f133c15b77c4018e8d7996541868ac94afb4f (patch) | |
tree | a1c6e163474556b611a7490dd47bd1ad33db05c7 /include/linux/torture.h | |
parent | d02c6b52d12fa30eeabfaf5aefe12078eacb94b2 (diff) | |
download | linux-4a5f133c15b77c4018e8d7996541868ac94afb4f.tar.xz |
rcutorture: Add races with task-exit processing
Several variants of Linux-kernel RCU interact with task-exit processing,
including preemptible RCU, Tasks RCU, and Tasks Trace RCU. This commit
therefore adds testing of this interaction to rcutorture by adding
rcutorture.read_exit_burst and rcutorture.read_exit_delay kernel-boot
parameters. These kernel parameters control the frequency and spacing
of special read-then-exit kthreads that are spawned.
[ paulmck: Apply feedback from Dan Carpenter's static checker. ]
[ paulmck: Reduce latency to avoid false-positive shutdown hangs. ]
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'include/linux/torture.h')
-rw-r--r-- | include/linux/torture.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/torture.h b/include/linux/torture.h index 629b66e6c161..7f65bd1dd307 100644 --- a/include/linux/torture.h +++ b/include/linux/torture.h @@ -55,6 +55,11 @@ struct torture_random_state { #define DEFINE_TORTURE_RANDOM_PERCPU(name) \ DEFINE_PER_CPU(struct torture_random_state, name) unsigned long torture_random(struct torture_random_state *trsp); +static inline void torture_random_init(struct torture_random_state *trsp) +{ + trsp->trs_state = 0; + trsp->trs_count = 0; +} /* Task shuffler, which causes CPUs to occasionally go idle. */ void torture_shuffle_task_register(struct task_struct *tp); |