aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2011-08-20 21:29:32 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2011-09-29 00:38:48 -0400
commite90c53d3e238dd0b7b02964370e8fece1778df96 (patch)
tree23e5b8623c2c37bd8a4656c66266209872f80701 /kernel
parent5b61b0baa9e80289c53413e573befc5790a04ac7 (diff)
rcu: Remove rcu_needs_cpu_flush() to avoid false quiescent states
The purpose of rcu_needs_cpu_flush() was to iterate on pushing the current grace period in order to help the current CPU enter dyntick-idle mode. However, this can result in failures if the CPU starts entering dyntick-idle mode, but then backs out. In this case, the call to rcu_pending() from rcu_needs_cpu_flush() might end up announcing a non-existing quiescent state. This commit therefore removes rcu_needs_cpu_flush() in favor of letting the dyntick-idle machinery at the end of the softirq handler push the loop along via its call to rcu_pending(). Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/rcutree.c3
-rw-r--r--kernel/rcutree.h1
-rw-r--r--kernel/rcutree_plugin.h25
3 files changed, 0 insertions, 29 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index 8455043c9250..e75df0c93abd 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -1528,9 +1528,6 @@ static void rcu_process_callbacks(struct softirq_action *unused)
1528 &__get_cpu_var(rcu_sched_data)); 1528 &__get_cpu_var(rcu_sched_data));
1529 __rcu_process_callbacks(&rcu_bh_state, &__get_cpu_var(rcu_bh_data)); 1529 __rcu_process_callbacks(&rcu_bh_state, &__get_cpu_var(rcu_bh_data));
1530 rcu_preempt_process_callbacks(); 1530 rcu_preempt_process_callbacks();
1531
1532 /* If we are last CPU on way to dyntick-idle mode, accelerate it. */
1533 rcu_needs_cpu_flush();
1534 trace_rcu_utilization("End RCU core"); 1531 trace_rcu_utilization("End RCU core");
1535} 1532}
1536 1533
diff --git a/kernel/rcutree.h b/kernel/rcutree.h
index f509f728f9fb..849ce9ec51fe 100644
--- a/kernel/rcutree.h
+++ b/kernel/rcutree.h
@@ -458,7 +458,6 @@ static int rcu_preempt_needs_cpu(int cpu);
458static void __cpuinit rcu_preempt_init_percpu_data(int cpu); 458static void __cpuinit rcu_preempt_init_percpu_data(int cpu);
459static void rcu_preempt_send_cbs_to_online(void); 459static void rcu_preempt_send_cbs_to_online(void);
460static void __init __rcu_init_preempt(void); 460static void __init __rcu_init_preempt(void);
461static void rcu_needs_cpu_flush(void);
462static void rcu_initiate_boost(struct rcu_node *rnp, unsigned long flags); 461static void rcu_initiate_boost(struct rcu_node *rnp, unsigned long flags);
463static void rcu_preempt_boost_start_gp(struct rcu_node *rnp); 462static void rcu_preempt_boost_start_gp(struct rcu_node *rnp);
464static void invoke_rcu_callbacks_kthread(void); 463static void invoke_rcu_callbacks_kthread(void);
diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h
index b4cbe5bf2326..4b9b9f8a4184 100644
--- a/kernel/rcutree_plugin.h
+++ b/kernel/rcutree_plugin.h
@@ -1948,15 +1948,6 @@ int rcu_needs_cpu(int cpu)
1948 return rcu_needs_cpu_quick_check(cpu); 1948 return rcu_needs_cpu_quick_check(cpu);
1949} 1949}
1950 1950
1951/*
1952 * Check to see if we need to continue a callback-flush operations to
1953 * allow the last CPU to enter dyntick-idle mode. But fast dyntick-idle
1954 * entry is not configured, so we never do need to.
1955 */
1956static void rcu_needs_cpu_flush(void)
1957{
1958}
1959
1960#else /* #if !defined(CONFIG_RCU_FAST_NO_HZ) */ 1951#else /* #if !defined(CONFIG_RCU_FAST_NO_HZ) */
1961 1952
1962#define RCU_NEEDS_CPU_FLUSHES 5 1953#define RCU_NEEDS_CPU_FLUSHES 5
@@ -2032,20 +2023,4 @@ int rcu_needs_cpu(int cpu)
2032 return c; 2023 return c;
2033} 2024}
2034 2025
2035/*
2036 * Check to see if we need to continue a callback-flush operations to
2037 * allow the last CPU to enter dyntick-idle mode.
2038 */
2039static void rcu_needs_cpu_flush(void)
2040{
2041 int cpu = smp_processor_id();
2042 unsigned long flags;
2043
2044 if (per_cpu(rcu_dyntick_drain, cpu) <= 0)
2045 return;
2046 local_irq_save(flags);
2047 (void)rcu_needs_cpu(cpu);
2048 local_irq_restore(flags);
2049}
2050
2051#endif /* #else #if !defined(CONFIG_RCU_FAST_NO_HZ) */ 2026#endif /* #else #if !defined(CONFIG_RCU_FAST_NO_HZ) */