diff options
author | Paul E. McKenney <paulmck@kernel.org> | 2022-04-14 09:09:11 -0700 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2022-07-21 17:41:56 -0700 |
commit | e4333cb20f047d96485a9416a93ae4b2ec3b27dd (patch) | |
tree | 9907bf28dd5706c8cbe8ffb2b71ef708853f6be9 /kernel/rcu/tree.h | |
parent | 7f4535366f8f77b3ddbc79d4ba82df966c5c2aab (diff) | |
download | linux-stable-e4333cb20f047d96485a9416a93ae4b2ec3b27dd.tar.gz linux-stable-e4333cb20f047d96485a9416a93ae4b2ec3b27dd.tar.bz2 linux-stable-e4333cb20f047d96485a9416a93ae4b2ec3b27dd.zip |
rcutorture: Verify that polled GP API sees synchronous grace periods
This commit causes rcu_torture_writer() to use WARN_ON_ONCE() to check
that the cookie returned by the current RCU flavor's ->get_gp_state()
function (get_state_synchronize_rcu() for vanilla RCU) causes that
flavor's ->poll_gp_state function (poll_state_synchronize_rcu() for
vanilla RCU) to unconditionally return true.
Note that a pair calls to synchronous grace-period-wait functions are
used. This is necessary to account for partially overlapping normal and
expedited grace periods aligning in just the wrong way with polled API
invocations, which can cause those polled API invocations to ignore one or
the other of those partially overlapping grace periods. It is unlikely
that this sort of ignored grace period will be a problem in production,
but rcutorture can make it happen quite within a few tens of seconds.
This commit is in preparation for polled expedited grace periods.
[ paulmck: Apply feedback from Frederic Weisbecker. ]
Link: https://lore.kernel.org/all/20220121142454.1994916-1-bfoster@redhat.com/
Link: https://docs.google.com/document/d/1RNKWW9jQyfjxw2E8dsXVTdvZYh0HnYeSHDKog9jhdN8/edit?usp=sharing
Cc: Brian Foster <bfoster@redhat.com>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Ian Kent <raven@themaw.net>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'kernel/rcu/tree.h')
0 files changed, 0 insertions, 0 deletions