You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rcutorture: Judge RCU priority boosting on grace periods, not callbacks
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: Paul E. McKenney <[email protected]>
if (!(test_boost==1&&cur_ops->can_boost) &&test_boost!=2)
2645
2621
return false;
2646
-
if (!cur_ops->call)
2622
+
if (!cur_ops->start_gp_poll|| !cur_ops->poll_gp_state)
2647
2623
return false;
2648
2624
2649
2625
prio=rcu_get_gp_kthreads_prio();
2650
2626
if (!prio)
2651
2627
return false;
2652
2628
2653
2629
if (prio<2) {
2654
-
if (boost_warn_once==1)
2630
+
if (boost_warn_once==1)
2655
2631
return false;
2656
2632
2657
2633
pr_alert("%s: WARN: RCU kthread priority too low to test boosting. Skipping RCU boost test. Try passing rcutree.kthread_prio > 1 on the kernel command line.\n", KBUILD_MODNAME);
@@ -3129,6 +3105,21 @@ rcu_torture_init(void)
3129
3105
if (firsterr<0)
3130
3106
goto unwind;
3131
3107
rcutor_hp=firsterr;
3108
+
3109
+
// Testing RCU priority boosting requires rcutorture do
3110
+
// some serious abuse. Counter this by running ksoftirqd
0 commit comments