Commit 558e8e27 authored by Linus Torvalds's avatar Linus Torvalds

Revert "nohz: Fix collision between tick and other hrtimers"

This reverts commit 24b91e36 and commit
7bdb59f1 ("tick/nohz: Fix possible missing clock reprog after tick
soft restart") that depends on it,

Pavel reports that it causes occasional boot hangs for him that seem to
depend on just how the machine was booted.  In particular, his machine
hangs at around the PCI fixups of the EHCI USB host controller, but only
hangs from cold boot, not from a warm boot.

Thomas Gleixner suspecs it's a CPU hotplug interaction, particularly
since Pavel also saw suspend/resume issues that seem to be related.
We're reverting for now while trying to figure out the root cause.
Reported-bisected-and-tested-by: default avatarPavel Machek <pavel@ucw.cz>
Acked-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
Cc: Wanpeng Li <wanpeng.li@hotmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@kernel.org  # reverted commits were marked for stable
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 4695daef
...@@ -725,11 +725,6 @@ static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts, ...@@ -725,11 +725,6 @@ static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts,
*/ */
if (delta == 0) { if (delta == 0) {
tick_nohz_restart(ts, now); tick_nohz_restart(ts, now);
/*
* Make sure next tick stop doesn't get fooled by past
* clock deadline
*/
ts->next_tick = 0;
goto out; goto out;
} }
} }
...@@ -772,7 +767,7 @@ static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts, ...@@ -772,7 +767,7 @@ static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts,
tick = expires; tick = expires;
/* Skip reprogram of event if its not changed */ /* Skip reprogram of event if its not changed */
if (ts->tick_stopped && (expires == ts->next_tick)) if (ts->tick_stopped && (expires == dev->next_event))
goto out; goto out;
/* /*
...@@ -792,8 +787,6 @@ static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts, ...@@ -792,8 +787,6 @@ static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts,
trace_tick_stop(1, TICK_DEP_MASK_NONE); trace_tick_stop(1, TICK_DEP_MASK_NONE);
} }
ts->next_tick = tick;
/* /*
* If the expiration time == KTIME_MAX, then we simply stop * If the expiration time == KTIME_MAX, then we simply stop
* the tick timer. * the tick timer.
...@@ -809,10 +802,7 @@ static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts, ...@@ -809,10 +802,7 @@ static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts,
else else
tick_program_event(tick, 1); tick_program_event(tick, 1);
out: out:
/* /* Update the estimated sleep length */
* Update the estimated sleep length until the next timer
* (not only the tick).
*/
ts->sleep_length = ktime_sub(dev->next_event, now); ts->sleep_length = ktime_sub(dev->next_event, now);
return tick; return tick;
} }
......
...@@ -27,7 +27,6 @@ enum tick_nohz_mode { ...@@ -27,7 +27,6 @@ enum tick_nohz_mode {
* timer is modified for nohz sleeps. This is necessary * timer is modified for nohz sleeps. This is necessary
* to resume the tick timer operation in the timeline * to resume the tick timer operation in the timeline
* when the CPU returns from nohz sleep. * when the CPU returns from nohz sleep.
* @next_tick: Next tick to be fired when in dynticks mode.
* @tick_stopped: Indicator that the idle tick has been stopped * @tick_stopped: Indicator that the idle tick has been stopped
* @idle_jiffies: jiffies at the entry to idle for idle time accounting * @idle_jiffies: jiffies at the entry to idle for idle time accounting
* @idle_calls: Total number of idle calls * @idle_calls: Total number of idle calls
...@@ -45,7 +44,6 @@ struct tick_sched { ...@@ -45,7 +44,6 @@ struct tick_sched {
unsigned long check_clocks; unsigned long check_clocks;
enum tick_nohz_mode nohz_mode; enum tick_nohz_mode nohz_mode;
ktime_t last_tick; ktime_t last_tick;
ktime_t next_tick;
int inidle; int inidle;
int tick_stopped; int tick_stopped;
unsigned long idle_jiffies; unsigned long idle_jiffies;
......
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