summaryrefslogtreecommitdiffstats
path: root/kernel/torture.c
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2018-08-07 14:34:44 -0700
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2018-08-29 09:20:48 -0700
commit474e59b476b3390ef9f730515439f21640b61623 (patch)
treebcbd93a01c459c55c5df6cd4d469d96cdc9e1c82 /kernel/torture.c
parentf4de46ed5bbc8ba9acebc8ac75809751b716e470 (diff)
downloadlinux-474e59b476b3390ef9f730515439f21640b61623.tar.bz2
rcutorture: Check GP completion at stutter end
The rcu_torture_writer() function invokes stutter_wait() at the end of each writer pass, which occasionally blocks for an extended time period in order to ensure that RCU can handle intermittent loads. But part of handling a busy period is invoking all the callbacks before the end of the idle period induced by stutter_wait(). This commit therefore adds a return value to stutter_wait() indicating whether stutter_wait() actually waited. In addition, this commit causes rcu_torture_writer() to test this value and if set, checks that all the elements of the rcu_tortures[] array have been freed up. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/torture.c')
-rw-r--r--kernel/torture.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/torture.c b/kernel/torture.c
index 1ac24a826589..17d91f5fba2a 100644
--- a/kernel/torture.c
+++ b/kernel/torture.c
@@ -573,7 +573,7 @@ static int stutter;
* Block until the stutter interval ends. This must be called periodically
* by all running kthreads that need to be subject to stuttering.
*/
-void stutter_wait(const char *title)
+bool stutter_wait(const char *title)
{
int spt;
@@ -590,6 +590,7 @@ void stutter_wait(const char *title)
}
torture_shutdown_absorb(title);
}
+ return !!spt;
}
EXPORT_SYMBOL_GPL(stutter_wait);