[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: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
2aa6eb313e
commit
6ba9b346e1
1 changed files with 4 additions and 4 deletions
|
@ -191,19 +191,19 @@ void tick_nohz_stop_sched_tick(void)
|
||||||
next_jiffies = get_next_timer_interrupt(last_jiffies);
|
next_jiffies = get_next_timer_interrupt(last_jiffies);
|
||||||
delta_jiffies = next_jiffies - 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
|
* Do not stop the tick, if we are only one off
|
||||||
* or if the cpu is required for rcu
|
* 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;
|
goto out;
|
||||||
|
|
||||||
/* Schedule the tick, if we are at least one jiffie off */
|
/* Schedule the tick, if we are at least one jiffie off */
|
||||||
if ((long)delta_jiffies >= 1) {
|
if ((long)delta_jiffies >= 1) {
|
||||||
|
|
||||||
if (rcu_needs_cpu(cpu))
|
if (delta_jiffies > 1)
|
||||||
delta_jiffies = 1;
|
|
||||||
else
|
|
||||||
cpu_set(cpu, nohz_cpu_mask);
|
cpu_set(cpu, nohz_cpu_mask);
|
||||||
/*
|
/*
|
||||||
* nohz_stop_sched_tick can be called several times before
|
* nohz_stop_sched_tick can be called several times before
|
||||||
|
|
Loading…
Add table
Reference in a new issue