<tt>call_rcu_bh()</tt>,
<tt>rcu_barrier_bh()</tt>, and
<tt>rcu_read_lock_bh_held()</tt>.
- <h3><a name="Sched Flavor">Sched Flavor</a></h3>
+++However, the update-side APIs are now simple wrappers for other RCU
+++flavors, namely RCU-sched in CONFIG_PREEMPT=n kernels and RCU-preempt
+++otherwise.
++
--<h3><a name="Sched Flavor">Sched Flavor</a></h3>
+++<h3><a name="Sched Flavor">Sched Flavor (Historical)</a></h3>
+
+++<p>
+++The RCU-sched flavor of RCU has since been expressed in terms of
+++the other RCU flavors as part of a consolidation of the three
+++flavors into a single flavor.
+++The read-side API remains, and continues to disable preemption and to
+++be accounted for by lockdep.
+++Much of the material in this section is therefore strictly historical
+++in nature.
<p>
Before preemptible RCU, waiting for an RCU grace period had the
if (!(torture_random(rrsp) % (nrealreaders * 2000 * longdelay_ms))) {
started = cur_ops->get_gp_seq();
ts = rcu_trace_clock_local();
+++ if (preempt_count() & (SOFTIRQ_MASK | HARDIRQ_MASK))
+++ longdelay_ms = 5; /* Avoid triggering BH limits. */
mdelay(longdelay_ms);
+ ++ rtrsp->rt_delay_ms = longdelay_ms;
completed = cur_ops->get_gp_seq();
do_trace_rcu_torture_read(cur_ops->name, NULL, ts,
started, completed);
.cb_barrier = rcu_barrier,
.fqs = rcu_force_quiescent_state,
.stats = NULL,
+++ .stall_dur = rcu_jiffies_till_stall_check,
.irq_capable = 1,
.can_boost = rcu_can_boost(),
+ ++ .extendables = RCUTORTURE_MAX_EXTEND,
.name = "rcu"
};
static void early_boot_test_call_rcu(void)
{
static struct rcu_head head;
++ + static struct rcu_head shead;
call_rcu(&head, test_callback);
- -}
- -
- -static void early_boot_test_call_rcu_bh(void)
- -{
- - static struct rcu_head head;
- -
- - call_rcu_bh(&head, test_callback);
- -}
- -
- -static void early_boot_test_call_rcu_sched(void)
- -{
- - static struct rcu_head head;
- -
- - call_rcu_sched(&head, test_callback);
++ + if (IS_ENABLED(CONFIG_SRCU))
++ + call_srcu(&early_srcu, &shead, test_callback);
}
- static void early_boot_test_call_rcu_bh(void)
- {
- static struct rcu_head head;
-
- call_rcu_bh(&head, test_callback);
- }
-
- static void early_boot_test_call_rcu_sched(void)
- {
- static struct rcu_head head;
-
- call_rcu_sched(&head, test_callback);
- }
-
void rcu_early_boot_tests(void)
{
pr_info("Running RCU self tests\n");
if (rcu_self_test) {
early_boot_test_counter++;
rcu_barrier();
++ + if (IS_ENABLED(CONFIG_SRCU)) {
++ + early_boot_test_counter++;
++ + srcu_barrier(&early_srcu);
++ + }
}
- -- if (rcu_self_test_bh) {
- -- early_boot_test_counter++;
- -- rcu_barrier_bh();
- -- }
- -- if (rcu_self_test_sched) {
- -- early_boot_test_counter++;
- -- rcu_barrier_sched();
- -- }
- --
if (rcu_self_test_counter != early_boot_test_counter) {
WARN_ON(1);
ret = -1;