RCU changes for v2.6.39
Subsystems (3)
Linus,
Please pull the latest core-locking-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git core-locking-for-linus
Thanks,
Ingo
Quoted 4 lines · Ingo Molnar
Please pull the latest core-locking-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.gitcore-locking-for-linus
Something screwed up? This was the core-locking pull request, not the RCU pull. And there's no shortlog or diff..
Linus
Quoted 8 lines · Linus Torvalds
Quoted 4 lines · Ingo Molnar
Please pull the latest core-locking-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.gitcore-locking-for-linusSomething screwed up? This was the core-locking pull request, not the RCU pull. And there's no shortlog or diff..
Oops, indeed. The right one is:
Please pull the latest core-rcu-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git core-rcu-for-linus
Thanks,
Ingo
------------------>
Amerigo Wang (1):
rcupdate: remove dead code
Jesper Juhl (1):
rcutorture: Get rid of duplicate sched.h include
Lai Jiangshan (1):
rcu: call __rcu_read_unlock() in exit_rcu for tiny RCU
Paul E. McKenney (3):
rcu: add documentation saying which RCU flavor to choose
rcu: add comment saying why DEBUG_OBJECTS_RCU_HEAD depends on PREEMPT.
smp: Document transitivity for memory barriers.
Documentation/RCU/whatisRCU.txt | 31 +++++++++++++++++++ Documentation/memory-barriers.txt | 58 +++++++++++++++++++++++++++++++++++++ kernel/rcupdate.c | 10 +++--- kernel/rcutiny_plugin.h | 2 +- kernel/rcutorture.c | 1 - 5 files changed, 95 insertions(+), 7 deletions(-)
Documentation/RCU/whatisRCU.txt +31 -0
@@ -849,6 +849,37 @@ All: lockdep-checked RCU-protected pointer access See the comment headers in the source code (or the docbook generated from them) for more information. +However, given that there are no fewer than four families of RCU APIs +in the Linux kernel, how do you choose which one to use? The following +list can be helpful: + +a. Will readers need to block? If so, you need SRCU. + +b. What about the -rt patchset? If readers would need to block + in an non-rt kernel, you need SRCU. If readers would block + in a -rt kernel, but not in a non-rt kernel, SRCU is not + necessary. + +c. Do you need to treat NMI handlers, hardirq handlers, + and code segments with preemption disabled (whether + via preempt_disable(), local_irq_save(), local_bh_disable(), + or some other mechanism) as if they were explicit RCU readers? + If so, you need RCU-sched. + +d. Do you need RCU grace periods to complete even in the face + of softirq monopolization of one or more of the CPUs? For + example, is your code subject to network-based denial-of-service + attacks? If so, you need RCU-bh. + +e. Is your workload too update-intensive for normal use of + RCU, but inappropriate for other synchronization mechanisms? + If so, consider SLAB_DESTROY_BY_RCU. But please be careful! + +f. Otherwise, use RCU. + +Of course, this all assumes that you have determined that RCU is in fact +the right tool for your job. + 8. ANSWERS TO QUICK QUIZZES
Documentation/memory-barriers.txt +58 -0
70 lines not on this page · raw message
kernel/rcupdate.c +5 -5
@@ -214,11 +214,12 @@ static int rcuhead_fixup_free(void *addr, enum debug_obj_state state)* Ensure that queued callbacks are all executed. * If we detect that we are nested in a RCU read-side critical * section, we should simply fail, otherwise we would deadlock. +* Note that the machinery to reliably determine whether +* or not we are in an RCU read-side critical section +* exists only in the preemptible RCU implementations +* (TINY_PREEMPT_RCU and TREE_PREEMPT_RCU), which is why +* DEBUG_OBJECTS_RCU_HEAD is disallowed if !PREEMPT. */ -#ifndef CONFIG_PREEMPT -WARN_ON (1 ); -return 0 ; -#else if (rcu_preempt_depth () !=0 ||preempt_count () !=0 ||irqs_disabled ()) {WARN_ON (1 );
@@ -229,7 +230,6 @@ static int rcuhead_fixup_free(void *addr, enum debug_obj_state state)rcu_barrier_bh ();debug_object_free (head, &rcuhead_debug_descr);return 1 ; -#endif default :return 0 ; }
kernel/rcutiny_plugin.h +1 -1
@@ -852,7 +852,7 @@ void exit_rcu(void)if (t->rcu_read_lock_nesting ==0 )return ; t->rcu_read_lock_nesting =1 ; - rcu_read_unlock(); + __rcu_read_unlock(); }#else /* #ifdef CONFIG_TINY_PREEMPT_RCU */
kernel/rcutorture.c +0 -1
@@ -47,7 +47,6 @@#include <linux/srcu.h> #include <linux/slab.h> #include <asm/byteorder.h> -#include <linux/sched.h> MODULE_LICENSE ("GPL" ); MODULE_AUTHOR("Paul E. McKenney <[email protected]> and "