]> asedeno.scripts.mit.edu Git - linux.git/commit
rcuperf: Defer expedited/normal check to end of test
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Fri, 14 Apr 2017 23:12:52 +0000 (16:12 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 8 Jun 2017 15:25:24 +0000 (08:25 -0700)
commit9683937df9ebf4eb62cdedb09c5f20a0760c7d80
treec54cae4bb6d5434178cf962d6c31c45827a60e0c
parent5b72f9643b52a5148bb8ced126e20563adfa3466
rcuperf: Defer expedited/normal check to end of test

Current rcuperf startup checks to see if the user asked to measure
only expedited grace periods, yet constrained all grace periods to be
normal, or if the user asked to measure only normal grace periods, yet
constrained all grace periods to be expedited.  Useless tests of this
sort are aborted.

Unfortunately, making RCU work through the mid-boot dead zone [1] puts
RCU into expedited-only mode during that zone.  Which happens to also
be the exact time that rcuperf carries out the aforementioned check.
So if the user asks rcuperf to measure only normal grace periods (the
default), rcuperf will now always complain and terminate the test.

This commit therefore moves the checks to rcu_perf_cleanup().  This has
the disadvantage of failing to abort useless tests, but avoids the need to
create yet another kthread and the need to do fiddly checks involving the
holdoff time.  (Yes, another approach is to do the checks in a late-stage
init function, but that would require some way to communicate badness
to rcuperf's kthreads, and seems not worth the bother.)

[1] https://lwn.net/Articles/716148/

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcu/rcuperf.c