Commit 6ba9b346 authored by Ingo Molnar's avatar Ingo Molnar Committed by Linus Torvalds

[PATCH] NOHZ: Fix RCU handling

When a CPU is needed for RCU the tick has to continue even when it was
stopped before.
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 2aa6eb31
......@@ -191,19 +191,19 @@ void tick_nohz_stop_sched_tick(void)
next_jiffies = get_next_timer_interrupt(last_jiffies);
delta_jiffies = next_jiffies - last_jiffies;
if (rcu_needs_cpu(cpu))
delta_jiffies = 1;
/*
* Do not stop the tick, if we are only one off
* or if the cpu is required for rcu
*/
if (!ts->tick_stopped && (delta_jiffies == 1 || rcu_needs_cpu(cpu)))
if (!ts->tick_stopped && delta_jiffies == 1)
goto out;
/* Schedule the tick, if we are at least one jiffie off */
if ((long)delta_jiffies >= 1) {
if (rcu_needs_cpu(cpu))
delta_jiffies = 1;
else
if (delta_jiffies > 1)
cpu_set(cpu, nohz_cpu_mask);
/*
* nohz_stop_sched_tick can be called several times before
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment