]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
rcu: Remove rcu_needs_cpu_flush() to avoid false quiescent states
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Sun, 21 Aug 2011 01:29:32 +0000 (18:29 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Fri, 26 Aug 2011 04:42:13 +0000 (21:42 -0700)
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>
kernel/rcutree.c
kernel/rcutree.h
kernel/rcutree_plugin.h

index 29e26107c4968647935bcba16d077165c01969c4..488bc2c85f29ad84e3dc4b544cc7250519941d38 100644 (file)
@@ -1532,9 +1532,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();
        trace_rcu_utilization("End RCU core");
 }
 
index f509f728f9fbe970a2ecae3d5d6d278cccb88961..849ce9ec51fec172639ca1012e636401ad53108f 100644 (file)
@@ -458,7 +458,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);
index 6d289a53d6d493490dcbd3d2045c681441a372d8..e59d9fcfe93e971f110cdce307635b0f879d0555 100644 (file)
@@ -1954,15 +1954,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
@@ -2039,20 +2030,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) */