nohz: Add hrtimer sanity check
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
parent
b23afd3848
commit
ce6cf9a15d
1 changed files with 7 additions and 2 deletions
|
@ -771,8 +771,13 @@ 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 == dev->next_event))
|
if (ts->tick_stopped) {
|
||||||
goto out;
|
if (hrtimer_active(&ts->sched_timer))
|
||||||
|
WARN_ON_ONCE(hrtimer_get_expires(&ts->sched_timer) < dev->next_event);
|
||||||
|
|
||||||
|
if (expires == dev->next_event)
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* nohz_stop_sched_tick can be called several times before
|
* nohz_stop_sched_tick can be called several times before
|
||||||
|
|
Loading…
Reference in a new issue