diff options
author | Paul E. McKenney <paul.mckenney@linaro.org> | 2011-11-22 23:43:02 -0500 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2011-12-11 13:32:02 -0500 |
commit | f535a607c13c7b674e0788ca5765779aa74a01c3 (patch) | |
tree | 433a07d16ff11d9f67e7991831cebf3cadfd9939 /kernel/rcutree.h | |
parent | 84ad00cb61f1cb21f0b63bc6f7dc254399eb3830 (diff) |
rcu: Eliminate RCU_FAST_NO_HZ grace-period hang
With the new implementation of RCU_FAST_NO_HZ, it was possible to hang
RCU grace periods as follows:
o CPU 0 attempts to go idle, cycles several times through the
rcu_prepare_for_idle() loop, then goes dyntick-idle when
RCU needs nothing more from it, while still having at least
on RCU callback pending.
o CPU 1 goes idle with no callbacks.
Both CPUs can then stay in dyntick-idle mode indefinitely, preventing
the RCU grace period from ever completing, possibly hanging the system.
This commit therefore prevents CPUs that have RCU callbacks from entering
dyntick-idle mode. This approach also eliminates the need for the
end-of-grace-period IPIs used previously.
Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcutree.h')
-rw-r--r-- | kernel/rcutree.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/kernel/rcutree.h b/kernel/rcutree.h index ea32405177c9..70d8a557090f 100644 --- a/kernel/rcutree.h +++ b/kernel/rcutree.h | |||
@@ -88,7 +88,6 @@ struct rcu_dynticks { | |||
88 | /* Process level is worth LLONG_MAX/2. */ | 88 | /* Process level is worth LLONG_MAX/2. */ |
89 | int dynticks_nmi_nesting; /* Track NMI nesting level. */ | 89 | int dynticks_nmi_nesting; /* Track NMI nesting level. */ |
90 | atomic_t dynticks; /* Even value for idle, else odd. */ | 90 | atomic_t dynticks; /* Even value for idle, else odd. */ |
91 | int wake_gp_end; /* A GP ended, need to wake up CPUs. */ | ||
92 | }; | 91 | }; |
93 | 92 | ||
94 | /* RCU's kthread states for tracing. */ | 93 | /* RCU's kthread states for tracing. */ |
@@ -469,7 +468,5 @@ static void rcu_yield(void (*f)(unsigned long), unsigned long arg); | |||
469 | static void rcu_cpu_kthread_setrt(int cpu, int to_rt); | 468 | static void rcu_cpu_kthread_setrt(int cpu, int to_rt); |
470 | static void __cpuinit rcu_prepare_kthreads(int cpu); | 469 | static void __cpuinit rcu_prepare_kthreads(int cpu); |
471 | static void rcu_prepare_for_idle(int cpu); | 470 | static void rcu_prepare_for_idle(int cpu); |
472 | static void rcu_wake_cpus_for_gp_end(void); | ||
473 | static void rcu_schedule_wake_gp_end(void); | ||
474 | 471 | ||
475 | #endif /* #ifndef RCU_TREE_NONCORE */ | 472 | #endif /* #ifndef RCU_TREE_NONCORE */ |