• Paul E. McKenney's avatar
    rcuperf: Defer expedited/normal check to end of test · 9683937d
    Paul E. McKenney authored
    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: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
    9683937d
rcuperf.c 16.1 KB