mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-28 23:23:55 +08:00
rcu: fixes to include/linux/rcupreempt.h
Hello! Compared tip/core/rcu to my latest patchset, and found the following issues: o the memory barrier in rcu_exit_nohz() somehow got out of place (it is correct in mainline as of 2.6.26-rc7). o There is a duplicate declaration of rcu_dyntick_sched. The attached patch fixes these. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
1f7b94cd3d
commit
ff9cf2ce7a
@ -111,7 +111,6 @@ extern struct rcupreempt_trace *rcupreempt_trace_cpu(int cpu);
|
|||||||
struct softirq_action;
|
struct softirq_action;
|
||||||
|
|
||||||
#ifdef CONFIG_NO_HZ
|
#ifdef CONFIG_NO_HZ
|
||||||
DECLARE_PER_CPU(struct rcu_dyntick_sched, rcu_dyntick_sched);
|
|
||||||
|
|
||||||
static inline void rcu_enter_nohz(void)
|
static inline void rcu_enter_nohz(void)
|
||||||
{
|
{
|
||||||
@ -126,8 +125,8 @@ static inline void rcu_exit_nohz(void)
|
|||||||
{
|
{
|
||||||
static DEFINE_RATELIMIT_STATE(rs, 10 * HZ, 1);
|
static DEFINE_RATELIMIT_STATE(rs, 10 * HZ, 1);
|
||||||
|
|
||||||
smp_mb(); /* CPUs seeing ++ must see later RCU read-side crit sects */
|
|
||||||
__get_cpu_var(rcu_dyntick_sched).dynticks++;
|
__get_cpu_var(rcu_dyntick_sched).dynticks++;
|
||||||
|
smp_mb(); /* CPUs seeing ++ must see later RCU read-side crit sects */
|
||||||
WARN_ON_RATELIMIT(!(__get_cpu_var(rcu_dyntick_sched).dynticks & 0x1),
|
WARN_ON_RATELIMIT(!(__get_cpu_var(rcu_dyntick_sched).dynticks & 0x1),
|
||||||
&rs);
|
&rs);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user