[kernel/f15] Avoid false quiescent states in rcutree with CONFIG_RCU_FAST_NO_HZ. (rhbz 577968)

Dave Jones davej at fedoraproject.org
Mon Aug 22 14:23:26 UTC 2011


commit 2b8c61a6bf1fb98f1332d96b194440760b57f7b8
Author: Dave Jones <davej at redhat.com>
Date:   Mon Aug 22 10:23:01 2011 -0400

    Avoid false quiescent states in rcutree with CONFIG_RCU_FAST_NO_HZ. (rhbz 577968)

 kernel.spec                                |    8 +++
 rcutree-avoid-false-quiescent-states.patch |   67 ++++++++++++++++++++++++++++
 2 files changed, 75 insertions(+), 0 deletions(-)
---
diff --git a/kernel.spec b/kernel.spec
index 20ae80c..f47298f 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -658,6 +658,8 @@ Patch2899: linux-2.6-v4l-dvb-fixes.patch
 Patch2900: linux-2.6-v4l-dvb-update.patch
 Patch2901: linux-2.6-v4l-dvb-experimental.patch
 
+Patch3000: rcutree-avoid-false-quiescent-states.patch
+
 # fs fixes
 
 # NFSv4
@@ -1246,6 +1248,9 @@ ApplyOptionalPatch linux-2.6-v4l-dvb-fixes.patch
 ApplyOptionalPatch linux-2.6-v4l-dvb-update.patch
 ApplyOptionalPatch linux-2.6-v4l-dvb-experimental.patch
 
+# Avoid false quiescent states in rcu.
+ApplyPatch rcutree-avoid-false-quiescent-states.patch
+
 # Patches headed upstream
 ApplyPatch disable-i8042-check-on-apple-mac.patch
 
@@ -1895,6 +1900,9 @@ fi
 # and build.
 
 %changelog
+* Mon Aug 22 2011 Dave Jones <davej at redhat.com>
+- Avoid false quiescent states in rcutree with CONFIG_RCU_FAST_NO_HZ. (rhbz 577968)
+
 * Fri Aug 19 2011 Josh Boyer <jwboyer at redhat.com>
 - Add patch to fix race between cryptd and aesni (rhbz 721002)
 
diff --git a/rcutree-avoid-false-quiescent-states.patch b/rcutree-avoid-false-quiescent-states.patch
new file mode 100644
index 0000000..9c7ffea
--- /dev/null
+++ b/rcutree-avoid-false-quiescent-states.patch
@@ -0,0 +1,67 @@
+diff --git a/kernel/rcutree.c b/kernel/rcutree.c
+index ba06207..c38a882 100644
+--- a/kernel/rcutree.c
++++ b/kernel/rcutree.c
+@@ -1476,9 +1476,6 @@ static void rcu_process_callbacks(struct softirq_action *unused)
+ 				&__get_cpu_var(rcu_sched_data));
+ 	__rcu_process_callbacks(&rcu_bh_state, &__get_cpu_var(rcu_bh_data));
+ 	rcu_preempt_process_callbacks();
+-
+-	/* If we are last CPU on way to dyntick-idle mode, accelerate it. */
+-	rcu_needs_cpu_flush();
+ }
+ 
+ /*
+diff --git a/kernel/rcutree.h b/kernel/rcutree.h
+index 01b2ccd..795f7fc 100644
+--- a/kernel/rcutree.h
++++ b/kernel/rcutree.h
+@@ -450,7 +450,6 @@ static int rcu_preempt_needs_cpu(int cpu);
+ static void __cpuinit rcu_preempt_init_percpu_data(int cpu);
+ static void rcu_preempt_send_cbs_to_online(void);
+ static void __init __rcu_init_preempt(void);
+-static void rcu_needs_cpu_flush(void);
+ static void rcu_initiate_boost(struct rcu_node *rnp, unsigned long flags);
+ static void rcu_preempt_boost_start_gp(struct rcu_node *rnp);
+ static void invoke_rcu_callbacks_kthread(void);
+diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h
+index 8aafbb8..b0254de 100644
+--- a/kernel/rcutree_plugin.h
++++ b/kernel/rcutree_plugin.h
+@@ -1907,15 +1907,6 @@ int rcu_needs_cpu(int cpu)
+ 	return rcu_needs_cpu_quick_check(cpu);
+ }
+ 
+-/*
+- * Check to see if we need to continue a callback-flush operations to
+- * allow the last CPU to enter dyntick-idle mode.  But fast dyntick-idle
+- * entry is not configured, so we never do need to.
+- */
+-static void rcu_needs_cpu_flush(void)
+-{
+-}
+-
+ #else /* #if !defined(CONFIG_RCU_FAST_NO_HZ) */
+ 
+ #define RCU_NEEDS_CPU_FLUSHES 5
+@@ -1991,20 +1982,4 @@ int rcu_needs_cpu(int cpu)
+ 	return c;
+ }
+ 
+-/*
+- * Check to see if we need to continue a callback-flush operations to
+- * allow the last CPU to enter dyntick-idle mode.
+- */
+-static void rcu_needs_cpu_flush(void)
+-{
+-	int cpu = smp_processor_id();
+-	unsigned long flags;
+-
+-	if (per_cpu(rcu_dyntick_drain, cpu) <= 0)
+-		return;
+-	local_irq_save(flags);
+-	(void)rcu_needs_cpu(cpu);
+-	local_irq_restore(flags);
+-}
+-
+ #endif /* #else #if !defined(CONFIG_RCU_FAST_NO_HZ) */


More information about the scm-commits mailing list