From: Paul E. McKenney Date: Thu, 30 Aug 2018 23:12:53 +0000 (-0700) Subject: Merge branches 'doc.2018.08.30a', 'dynticks.2018.08.30b', 'srcu.2018.08.30b' and... X-Git-Tag: v4.20-rc1~172^2^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b56ada120921fbb0a4fb2a5bee163717182e7e9e;p=thirdparty%2Flinux.git Merge branches 'doc.2018.08.30a', 'dynticks.2018.08.30b', 'srcu.2018.08.30b' and 'torture.2018.08.29a' into HEAD doc.2018.08.30a: Documentation updates dynticks.2018.08.30b: RCU flavor consolidation updates and cleanups srcu.2018.08.30b: SRCU updates torture.2018.08.29a: Torture-test updates --- b56ada120921fbb0a4fb2a5bee163717182e7e9e diff --cc Documentation/RCU/Design/Requirements/Requirements.html index 701b5c53607f8,038714475edbf,49690228b1c69,49690228b1c69..43c4e2f05f402 --- a/Documentation/RCU/Design/Requirements/Requirements.html +++ b/Documentation/RCU/Design/Requirements/Requirements.html @@@@@ -2929,20 -2916,8 -2918,8 -2918,8 +2927,20 @@@@@ include call_rcu_bh(), rcu_barrier_bh(), and rcu_read_lock_bh_held(). +++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. ++ -

Sched Flavor

+++

Sched Flavor (Historical)

+ --

Sched Flavor

+++

+++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.

Before preemptible RCU, waiting for an RCU grace period had the diff --cc kernel/rcu/rcutorture.c index c596c6f1e4571,1141e0d84ff12,c596c6f1e4571,a02a2f21386ba..210c774603656 --- a/kernel/rcu/rcutorture.c +++ b/kernel/rcu/rcutorture.c @@@@@ -325,7 -343,8 -325,7 -333,9 +351,10 @@@@@ rcu_read_delay(struct torture_random_st 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); @@@@@ -429,8 -452,9 -429,8 -439,9 +462,10 @@@@@ static struct rcu_torture_ops rcu_ops .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" }; diff --cc kernel/rcu/update.c index 39cb23d221093,fa089ead4bd6a,7d057d0aaec40,a6b860422d184..f203b94f6b5be --- a/kernel/rcu/update.c +++ b/kernel/rcu/update.c @@@@@ -891,24 -882,10 -893,27 -892,24 +885,13 @@@@@ DEFINE_STATIC_SRCU(early_srcu) 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"); @@@@@ -930,16 -903,7 -935,20 -931,16 +909,11 @@@@@ static int rcu_verify_early_boot_tests( 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;