Update RCU documentation and fix sparse warnings
Subsystems (3)
cover Update RCU documentation and fix sparse warnings
Hello!
The following two patches update the RCU documentation based on last year's changes to RCU, and also fix a few sparse warnings. These are good to go.
Thanx, Paul
PATCH 1/2 rcu: 1Q2010 update for RCU documentation
Add expedited functions. Review documentation and update obsolete verbiage. Also fix the advice for the RCU CPU-stall kernel configuration parameter, and document RCU CPU-stall warnings.
--- Documentation/RCU/00-INDEX | 8 +- Documentation/RCU/RTFP.txt | 58 +++++++- Documentation/RCU/checklist.txt | 200 +++++++++++++++----------- Documentation/RCU/rcu.txt | 48 +------ Documentation/RCU/stallwarn.txt | 58 ++++++++ Documentation/RCU/torture.txt | 12 ++ Documentation/RCU/whatisRCU.txt | 3 +- Documentation/filesystems/dentry-locking.txt | 3 +- lib/Kconfig.debug | 4 +- 9 files changed, 258 insertions(+), 136 deletions(-) create mode 100644 Documentation/RCU/stallwarn.txt
Documentation/RCU/00-INDEX +6 -2
@@ -8,14 +8,18 @@ listRCU.txt - Using RCU to Protect Read-Mostly Linked Lists NMI-RCU.txt - Using RCU to Protect Dynamic NMI Handlers +rcubarrier.txt + - RCU and Unloadable Modules +rculist_nulls.txt + - RCU list primitives for use with SLAB_DESTROY_BY_RCU rcuref.txt - Reference-count design for elements of lists/arrays protected by RCU rcu.txt - RCU Concepts -rcubarrier.txt - - Unloading modules that use RCU callbacks RTFP.txt - List of RCU papers (bibliography) going back to 1980. +stallwarn.txt + - RCU CPU stall warnings (CONFIG_RCU_CPU_STALL_DETECTOR) torture.txt - RCU Torture Test Operation (CONFIG_RCU_TORTURE_TEST) trace.txt
Documentation/RCU/RTFP.txt +54 -4
79 lines not on this page · raw message
Documentation/RCU/checklist.txt +119 -81
297 lines not on this page · raw message
Documentation/RCU/rcu.txt +3 -45
57 lines not on this page · raw message
Documentation/RCU/stallwarn.txt new file +58 -0
58 lines not on this page · raw message
Documentation/RCU/torture.txt +12 -0
@@ -30,6 +30,18 @@ MODULE PARAMETERS This module has the following parameters: +fqs_duration Duration (in microseconds) of artificially induced bursts + of force_quiescent_state() invocations. In RCU + implementations having force_quiescent_state(), these + bursts help force races between forcing a given grace + period and that grace period ending on its own. + +fqs_holdoff Holdoff time (in microseconds) between consecutive calls + to force_quiescent_state() within a burst. + +fqs_stutter Wait time (in seconds) between consecutive bursts + of calls to force_quiescent_state(). + irqreaders Says to invoke RCU readers from irq level. This is currently done via timers. Defaults to "1" for variants of RCU that permit this. (Or, more accurately, variants of RCU that do
Documentation/RCU/whatisRCU.txt +2 -1
@@ -327,7 +327,8 @@ a. synchronize_rcu() rcu_read_lock() / rcu_read_unlock() b. call_rcu_bh() rcu_read_lock_bh() / rcu_read_unlock_bh() -c. synchronize_sched() preempt_disable() / preempt_enable() +c. synchronize_sched() rcu_read_lock_sched() / rcu_read_unlock_sched() + preempt_disable() / preempt_enable() local_irq_save() / local_irq_restore() hardirq enter / hardirq exit NMI enter / NMI exit
Documentation/filesystems/dentry-locking.txt +2 -1
@@ -62,7 +62,8 @@ changes are : 2. Insertion of a dentry into the hash table is done using hlist_add_head_rcu() which take care of ordering the writes - the writes to the dentry must be visible before the dentry is - inserted. This works in conjunction with hlist_for_each_rcu() while + inserted. This works in conjunction with hlist_for_each_rcu(), + which has since been replaced by hlist_for_each_entry_rcu(), while walking the hash chain. The only requirement is that all initialization to the dentry must be done before hlist_add_head_rcu() since we don't have dcache_lock protection
lib/Kconfig.debug +2 -2
@@ -765,9 +765,9 @@ config RCU_CPU_STALL_DETECTOR CPUs are delaying the current grace period, but only when the grace period extends for excessive time periods. - Say Y if you want RCU to perform such checks. + Say N if you want to disable such checks. - Say N if you are unsure. + Say Y if you are unsure. config KPROBES_SANITY_TEST bool "Kprobes sanity tests"
Signature · 1 line
1.5.2.5
[tip:core/rcu] rcu: 1Q2010 update for RCU documentation
Commit-ID: 4c54005ca438a8b46dd542b497d4f0dc2ca375e8 Gitweb: http://git.kernel.org/tip/4c54005ca438a8b46dd542b497d4f0dc2ca375e8 Author: Paul E. McKenney <[email protected]> AuthorDate: Thu, 14 Jan 2010 16:10:57 -0800 Committer: Ingo Molnar <[email protected]> CommitDate: Sat, 16 Jan 2010 10:25:22 +0100
rcu: 1Q2010 update for RCU documentation
Add expedited functions. Review documentation and update obsolete verbiage. Also fix the advice for the RCU CPU-stall kernel configuration parameter, and document RCU CPU-stall warnings.
LKML-Reference: <12635142581866-git-send-email->
--- Documentation/RCU/00-INDEX | 8 +- Documentation/RCU/RTFP.txt | 58 +++++++- Documentation/RCU/checklist.txt | 200 +++++++++++++++----------- Documentation/RCU/rcu.txt | 48 +------ Documentation/RCU/stallwarn.txt | 58 ++++++++ Documentation/RCU/torture.txt | 12 ++ Documentation/RCU/whatisRCU.txt | 3 +- Documentation/filesystems/dentry-locking.txt | 3 +- lib/Kconfig.debug | 4 +- 9 files changed, 258 insertions(+), 136 deletions(-)
Documentation/RCU/00-INDEX +6 -2
@@ -8,14 +8,18 @@ listRCU.txt - Using RCU to Protect Read-Mostly Linked Lists NMI-RCU.txt - Using RCU to Protect Dynamic NMI Handlers +rcubarrier.txt + - RCU and Unloadable Modules +rculist_nulls.txt + - RCU list primitives for use with SLAB_DESTROY_BY_RCU rcuref.txt - Reference-count design for elements of lists/arrays protected by RCU rcu.txt - RCU Concepts -rcubarrier.txt - - Unloading modules that use RCU callbacks RTFP.txt - List of RCU papers (bibliography) going back to 1980. +stallwarn.txt + - RCU CPU stall warnings (CONFIG_RCU_CPU_STALL_DETECTOR) torture.txt - RCU Torture Test Operation (CONFIG_RCU_TORTURE_TEST) trace.txt
Documentation/RCU/RTFP.txt +54 -4
79 lines not on this page · raw message
Documentation/RCU/checklist.txt +119 -81
297 lines not on this page · raw message
Documentation/RCU/rcu.txt +3 -45
57 lines not on this page · raw message
Documentation/RCU/stallwarn.txt new file +58 -0
58 lines not on this page · raw message
Documentation/RCU/torture.txt +12 -0
@@ -30,6 +30,18 @@ MODULE PARAMETERS This module has the following parameters: +fqs_duration Duration (in microseconds) of artificially induced bursts + of force_quiescent_state() invocations. In RCU + implementations having force_quiescent_state(), these + bursts help force races between forcing a given grace + period and that grace period ending on its own. + +fqs_holdoff Holdoff time (in microseconds) between consecutive calls + to force_quiescent_state() within a burst. + +fqs_stutter Wait time (in seconds) between consecutive bursts + of calls to force_quiescent_state(). + irqreaders Says to invoke RCU readers from irq level. This is currently done via timers. Defaults to "1" for variants of RCU that permit this. (Or, more accurately, variants of RCU that do
Documentation/RCU/whatisRCU.txt +2 -1
@@ -327,7 +327,8 @@ a. synchronize_rcu() rcu_read_lock() / rcu_read_unlock() b. call_rcu_bh() rcu_read_lock_bh() / rcu_read_unlock_bh() -c. synchronize_sched() preempt_disable() / preempt_enable() +c. synchronize_sched() rcu_read_lock_sched() / rcu_read_unlock_sched() + preempt_disable() / preempt_enable() local_irq_save() / local_irq_restore() hardirq enter / hardirq exit NMI enter / NMI exit
Documentation/filesystems/dentry-locking.txt +2 -1
@@ -62,7 +62,8 @@ changes are : 2. Insertion of a dentry into the hash table is done using hlist_add_head_rcu() which take care of ordering the writes - the writes to the dentry must be visible before the dentry is - inserted. This works in conjunction with hlist_for_each_rcu() while + inserted. This works in conjunction with hlist_for_each_rcu(), + which has since been replaced by hlist_for_each_entry_rcu(), while walking the hash chain. The only requirement is that all initialization to the dentry must be done before hlist_add_head_rcu() since we don't have dcache_lock protection
lib/Kconfig.debug +2 -2
@@ -765,9 +765,9 @@ config RCU_CPU_STALL_DETECTOR CPUs are delaying the current grace period, but only when the grace period extends for excessive time periods. - Say Y if you want RCU to perform such checks. + Say N if you want to disable such checks. - Say N if you are unsure. + Say Y if you are unsure. config KPROBES_SANITY_TEST bool "Kprobes sanity tests"
PATCH 2/2 rcu: fix sparse warnings
In reply to Paul E. McKenneyFrom: Paul E. McKenney <[email protected]>
Rename local variable "i" in rcu_init() to avoid conflict with RCU_INIT_FLAVOR(), restrict the scope of RCU_TREE_NONCORE, and make __synchronize_srcu() static.
--- kernel/rcutree.c | 6 +++--- kernel/rcutree.h | 6 ++---- kernel/srcu.c | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-)
kernel/rcutree.c +3 -3
@@ -1888,7 +1888,7 @@ do { \void __init rcu_init (void ) { -int i; +int cpu;rcu_bootup_announce ();#ifdef CONFIG_RCU_CPU_STALL_DETECTOR
@@ -1908,8 +1908,8 @@ void __init rcu_init(void)* or the scheduler are operational. */ cpu_notifier (rcu_cpu_notify,0 ); -for_each_online_cpu (i) -rcu_cpu_notify (NULL ,CPU_UP_PREPARE , (void *)(long )i); +for_each_online_cpu (cpu) +rcu_cpu_notify (NULL ,CPU_UP_PREPARE , (void *)(long )cpu); }#include "rcutree_plugin.h"
kernel/rcutree.h +2 -4
@@ -323,8 +323,6 @@ struct rcu_state {#define RCU_OFL_TASKS_EXP_GP 0x2/* Tasks blocking expedited */ /* GP were moved to root. */ -#ifdef RCU_TREE_NONCORE -/* * RCU implementation internal declarations: */
@@ -339,7 +337,7 @@ extern struct rcu_state rcu_preempt_state; DECLARE_PER_CPU(struct rcu_data, rcu_preempt_data);#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */ -#else /* #ifdef RCU_TREE_NONCORE */ +#ifndef RCU_TREE_NONCORE /* Forward declarations for rcutree_plugin.h */ static void rcu_bootup_announce (void );
@@ -372,4 +370,4 @@ static void __cpuinit rcu_preempt_init_percpu_data(int cpu);static void rcu_preempt_send_cbs_to_orphanage (void );static void __init __rcu_init_preempt (void ); -#endif /* #else #ifdef RCU_TREE_NONCORE */ +#endif /* #ifndef RCU_TREE_NONCORE */
kernel/srcu.c +1 -1
@@ -144,7 +144,7 @@ EXPORT_SYMBOL_GPL(srcu_read_unlock);/* * Helper function for synchronize_srcu() and synchronize_srcu_expedited(). */ -void __synchronize_srcu (struct srcu_struct *sp,void (*sync_func)(void )) +static void __synchronize_srcu (struct srcu_struct *sp,void (*sync_func)(void )) {int idx;
Signature · 1 line
1.5.2.5
[tip:core/rcu] rcu: Fix sparse warnings
Commit-ID: 017c426138122c8e9b9f5057fbd0567c37b35247 Gitweb: http://git.kernel.org/tip/017c426138122c8e9b9f5057fbd0567c37b35247 Author: Paul E. McKenney <[email protected]> AuthorDate: Thu, 14 Jan 2010 16:10:58 -0800 Committer: Ingo Molnar <[email protected]> CommitDate: Sat, 16 Jan 2010 10:25:22 +0100
rcu: Fix sparse warnings
Rename local variable "i" in rcu_init() to avoid conflict with RCU_INIT_FLAVOR(), restrict the scope of RCU_TREE_NONCORE, and make __synchronize_srcu() static.
LKML-Reference: <12635142581560-git-send-email->
--- kernel/rcutree.c | 6 +++--- kernel/rcutree.h | 6 ++---- kernel/srcu.c | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-)
kernel/rcutree.c +3 -3
@@ -1888,7 +1888,7 @@ do { \void __init rcu_init (void ) { -int i; +int cpu;rcu_bootup_announce ();#ifdef CONFIG_RCU_CPU_STALL_DETECTOR
@@ -1908,8 +1908,8 @@ void __init rcu_init(void)* or the scheduler are operational. */ cpu_notifier (rcu_cpu_notify,0 ); -for_each_online_cpu (i) -rcu_cpu_notify (NULL ,CPU_UP_PREPARE , (void *)(long )i); +for_each_online_cpu (cpu) +rcu_cpu_notify (NULL ,CPU_UP_PREPARE , (void *)(long )cpu); }#include "rcutree_plugin.h"
kernel/rcutree.h +2 -4
@@ -323,8 +323,6 @@ struct rcu_state {#define RCU_OFL_TASKS_EXP_GP 0x2/* Tasks blocking expedited */ /* GP were moved to root. */ -#ifdef RCU_TREE_NONCORE -/* * RCU implementation internal declarations: */
@@ -339,7 +337,7 @@ extern struct rcu_state rcu_preempt_state; DECLARE_PER_CPU(struct rcu_data, rcu_preempt_data);#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */ -#else /* #ifdef RCU_TREE_NONCORE */ +#ifndef RCU_TREE_NONCORE /* Forward declarations for rcutree_plugin.h */ static void rcu_bootup_announce (void );
@@ -372,4 +370,4 @@ static void __cpuinit rcu_preempt_init_percpu_data(int cpu);static void rcu_preempt_send_cbs_to_orphanage (void );static void __init __rcu_init_preempt (void ); -#endif /* #else #ifdef RCU_TREE_NONCORE */ +#endif /* #ifndef RCU_TREE_NONCORE */
kernel/srcu.c +1 -1
@@ -144,7 +144,7 @@ EXPORT_SYMBOL_GPL(srcu_read_unlock);/* * Helper function for synchronize_srcu() and synchronize_srcu_expedited(). */ -void __synchronize_srcu (struct srcu_struct *sp,void (*sync_func)(void )) +static void __synchronize_srcu (struct srcu_struct *sp,void (*sync_func)(void )) {int idx;