• Paul E. McKenney's avatar
    rcutorture: Judge RCU priority boosting on grace periods, not callbacks · ea6d962e
    Paul E. McKenney authored
    Currently, rcutorture's testing of RCU priority boosting insists not
    only that grace periods complete, but also that callbacks be invoked.
    Although this is in fact what the user would want, ensuring that there
    is sufficient CPU bandwidth devoted to callback execution is in fact
    the user's responsibility.  One could argue that rcutorture can take on
    that responsibility, which is true in theory.  But in practice, ensuring
    sufficient CPU bandwidth to ksoftirqd, any rcuc kthreads, and any rcuo
    kthreads is not particularly consistent with rcutorture's main job,
    that of stress-testing RCU.  In addition, if the system administrator
    (say) makes very poor choices when pinning rcuo kthreads and then runs
    rcutorture, there really isn't much rcutorture can do.
    
    Besides, RCU priority boosting only boosts lagging readers, not all the
    machinery required to invoke callbacks in a timely fashion.
    
    This commit therefore switches rcutorture's evaluation of RCU priority
    boosting from callback execution to grace-period completion by using
    the new start_poll_synchronize_rcu() and poll_state_synchronize_rcu()
    functions.  When rcutorture is built in (as in when there is no innocent
    workload to inconvenience), the ksoftirqd ktheads are boosted to real-time
    priority 2 in order to allow timeouts to work properly in the face of
    rcutorture's testing of RCU priority boosting.
    
    Indeed, it is not as easy as it looks to create a reliable test of RCU
    priority boosting without destroying the rest of the kernel!
    Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
    ea6d962e
rcutorture.c 95 KB