core kernel fixes
Linus,
Please pull the latest core-fixes-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git core-fixes-for-linus
RCU fixes.
Thanks,
Ingo
------------------>
Josh Triplett (1):
rcutorture: Occasionally delay readers enough to make RCU force_quiescent_state
Paul E. McKenney (10):
rcu: Need to update rnp->gpnum if preemptable RCU is to be reliable
rcu: Initialize multi-level RCU grace periods holding locks
rcu: Kconfig help needs to say that TREE_PREEMPT_RCU scales down
rcu: Add debug checks to TREE_PREEMPT_RCU for premature grace periods
rcu: Simplify rcu_read_unlock_special() quiescent-state accounting
rcu: Fix synchronize_rcu() for TREE_PREEMPT_RCU
rcu: Add WARN_ON_ONCE() consistency checks covering state transitions
rcu: Apply results of code inspection of kernel/rcutree_plugin.h
rcu: Fix thinko, actually initialize full tree
rcu: Fix whitespace inconsistencies
include/linux/rculist_nulls.h | 2 +- include/linux/rcupdate.h | 29 +++-------- include/linux/rcutree.h | 6 +- include/linux/sched.h | 1 - init/Kconfig | 3 +- kernel/rcupdate.c | 48 +++++++++++++++++- kernel/rcutorture.c | 43 +++++++++------- kernel/rcutree.c | 105 ++++++++++++++------------------------- kernel/rcutree.h | 2 +- kernel/rcutree_plugin.h | 110 +++++++++++++++++++++++++++-------------- kernel/rcutree_trace.c | 2 +- 11 files changed, 195 insertions(+), 156 deletions(-)
include/linux/rculist_nulls.h +1 -1
@@ -102,7 +102,7 @@ static inline void hlist_nulls_add_head_rcu(struct hlist_nulls_node *n,*/ #define hlist_nulls_for_each_entry_rcu (tpos, pos, head, member) \ for (pos = rcu_dereference((head)->first); \ - (!is_a_nulls(pos)) && \ + (!is_a_nulls(pos)) && \ ({ tpos = hlist_nulls_entry(pos, typeof(*tpos), member); 1; }); \ pos = rcu_dereference(pos->next))
include/linux/rcupdate.h +8 -21
@@ -1,5 +1,5 @@/* -* Read-Copy Update mechanism for mutual exclusion +* Read-Copy Update mechanism for mutual exclusion * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@* Copyright IBM Corporation, 2001 * * Author: Dipankar Sarma <[email protected]> -* +* * Based on the original work by Paul McKenney <[email protected]> * and inputs from Rusty Russell, Andrea Arcangeli and Andi Kleen. * Papers:
@@ -26,7 +26,7 @@* http://lse.sourceforge.net/locking/rclock_OLS.2001.05.01c.sc.pdf (OLS2001) * * For detailed explanation of Read-Copy Update mechanism see - -* http://lse.sourceforge.net/locking/rcupdate.html +* http://lse.sourceforge.net/locking/rcupdate.html * */
@@ -52,8 +52,13 @@ struct rcu_head { };/* Exported common interfaces */ +#ifdef CONFIG_TREE_PREEMPT_RCU extern void synchronize_rcu (void ); +#else /* #ifdef CONFIG_TREE_PREEMPT_RCU */ +#define synchronize_rcu synchronize_sched +#endif /* #else #ifdef CONFIG_TREE_PREEMPT_RCU */ extern void synchronize_rcu_bh (void ); +extern void synchronize_sched (void );extern void rcu_barrier (void );extern void rcu_barrier_bh (void );extern void rcu_barrier_sched (void );
@@ -262,24 +267,6 @@ struct rcu_synchronize {extern void wakeme_after_rcu (struct rcu_head *head);/** -* synchronize_sched - block until all CPUs have exited any non-preemptive -* kernel code sequences. -* -* This means that all preempt_disable code sequences, including NMI and -* hardware-interrupt handlers, in progress on entry will have completed -* before this primitive returns. However, this does not guarantee that -* softirq handlers will have completed, since in some kernels, these -* handlers can run in process context, and can block. -* -* This primitive provides the guarantees made by the (now removed) -* synchronize_kernel() API. In contrast, synchronize_rcu() only -* guarantees that rcu_read_lock() sections will have completed. -* In "classic RCU", these two guarantees happen to be one and -* the same, but can differ in realtime RCU implementations. -*/ -#define synchronize_sched () __synchronize_sched() - -/** * call_rcu - Queue an RCU callback for invocation after a grace period. * @head: structure to be used for queueing the RCU updates. * @func: actual update function to be invoked after the grace period
include/linux/rcutree.h +3 -3
@@ -24,7 +24,7 @@* and inputs from Rusty Russell, Andrea Arcangeli and Andi Kleen. * * For detailed explanation of Read-Copy Update mechanism see - -* Documentation/RCU +* Documentation/RCU */ #ifndef __LINUX_RCUTREE_H
@@ -53,6 +53,8 @@ static inline void __rcu_read_unlock(void)preempt_enable (); } +#define __synchronize_sched () synchronize_rcu() +static inline void exit_rcu (void ) { }
@@ -68,8 +70,6 @@ static inline void __rcu_read_unlock_bh(void)local_bh_enable (); } -#define __synchronize_sched () synchronize_rcu() -extern void call_rcu_sched (struct rcu_head *head,void (*func)(struct rcu_head *rcu));
include/linux/sched.h +0 -1
@@ -1740,7 +1740,6 @@ extern cputime_t task_gtime(struct task_struct *p);#define RCU_READ_UNLOCK_BLOCKED (1 << 0)/* blocked while in RCU read-side. */ #define RCU_READ_UNLOCK_NEED_QS (1 << 1)/* RCU core needs CPU response. */ -#define RCU_READ_UNLOCK_GOT_QS (1 << 2)/* CPU has responded to RCU core. */ static inline void rcu_copy_process (struct task_struct *p) {
init/Kconfig +2 -1
@@ -331,7 +331,8 @@ config TREE_PREEMPT_RCU This option selects the RCU implementation that is designed for very large SMP systems with hundreds or thousands of CPUs, but for which real-time response - is also required. + is also required. It also scales down nicely to + smaller systems. endchoice
kernel/rcupdate.c +45 -3
78 lines not on this page · raw message
kernel/rcutorture.c +24 -19
114 lines not on this page · raw message
kernel/rcutree.c +38 -67
215 lines not on this page · raw message
kernel/rcutree.h +1 -1
@@ -142,7 +142,7 @@ struct rcu_data {*/ struct rcu_head *nxtlist;struct rcu_head **nxttail[RCU_NEXT_SIZE ]; -long qlen;/* # of queued callbacks */ +long qlen;/* # of queued callbacks */ long blimit;/* Upper limit on a processed batch */ #ifdef CONFIG_NO_HZ
kernel/rcutree_plugin.h +72 -38
215 lines not on this page · raw message
kernel/rcutree_trace.c +1 -1
@@ -20,7 +20,7 @@* Papers: http://www.rdrop.com/users/paulmck/RCU * * For detailed explanation of Read-Copy Update mechanism see - -* Documentation/RCU +* Documentation/RCU * */ #include <linux/types.h>