From: tip-bot for Frederic Weisbecker <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: hartsjc@redhat.com, hpa@zytor.com, linux-kernel@vger.kernel.org,
peterz@infradead.org, mingo@kernel.org, pavel@ucw.cz,
fweisbec@gmail.com, tglx@linutronix.de, riel@redhat.com,
tim@binbash.co.uk
Subject: [tip:timers/urgent] tick: Make sure tick timer is active when bypassing reprogramming
Date: Sun, 23 Apr 2017 04:37:34 -0700 [thread overview]
Message-ID: <tip-22aa2ad45fd8a6ef56eb60038fc0ac7059c0a986@git.kernel.org> (raw)
In-Reply-To: <1492783255-5051-3-git-send-email-fweisbec@gmail.com>
Commit-ID: 22aa2ad45fd8a6ef56eb60038fc0ac7059c0a986
Gitweb: http://git.kernel.org/tip/22aa2ad45fd8a6ef56eb60038fc0ac7059c0a986
Author: Frederic Weisbecker <fweisbec@gmail.com>
AuthorDate: Fri, 21 Apr 2017 16:00:55 +0200
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sun, 23 Apr 2017 13:33:18 +0200
tick: Make sure tick timer is active when bypassing reprogramming
So far we have run into too much troubles with the optimization path
that skips reprogramming the clock on IRQ exit when the expiration
deadline hasn't changed. If by accident the cached deadline happens to
be out of sync with the hardware deadline, the buggy result and its
cause are hard to investigate. So lets detect and warn about the issue
early.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Rik van Riel <riel@redhat.com>
Cc: James Hartsock <hartsjc@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Cc: Tim Wright <tim@binbash.co.uk>
Cc: Pavel Machek <pavel@ucw.cz>
Link: http://lkml.kernel.org/r/1492783255-5051-3-git-send-email-fweisbec@gmail.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
kernel/time/tick-sched.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 502b320..be7ca4d 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -783,8 +783,13 @@ static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts,
tick = expires;
/* Skip reprogram of event if its not changed */
- if (ts->tick_stopped && (expires == ts->next_tick))
- goto out;
+ if (ts->tick_stopped && (expires == ts->next_tick)) {
+ /* Sanity check: make sure clockevent is actually programmed */
+ if (likely(dev->next_event <= ts->next_tick))
+ goto out;
+
+ WARN_ON_ONCE(1);
+ }
/*
* nohz_stop_sched_tick can be called several times before
next prev parent reply other threads:[~2017-04-23 11:43 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-21 14:00 [PATCH 0/2] nohz: Deal with clock reprogram skipping issues v2 Frederic Weisbecker
2017-04-21 14:00 ` [PATCH 1/2] nohz: Fix again collision between tick and other hrtimers Frederic Weisbecker
2017-04-23 11:36 ` [tip:timers/urgent] " tip-bot for Frederic Weisbecker
2017-05-17 8:46 ` [tip:timers/nohz] nohz: Fix collision between tick and other hrtimers, again tip-bot for Frederic Weisbecker
2017-04-21 14:00 ` [PATCH 2/2] tick: Make sure tick timer is active when bypassing reprogramming Frederic Weisbecker
2017-04-23 11:37 ` tip-bot for Frederic Weisbecker [this message]
2017-06-03 8:06 ` Levin, Alexander (Sasha Levin)
2017-06-03 12:42 ` Frederic Weisbecker
2017-06-03 13:00 ` Levin, Alexander (Sasha Levin)
2017-06-06 14:52 ` Frederic Weisbecker
2017-06-07 4:17 ` Levin, Alexander (Sasha Levin)
2017-06-07 14:14 ` Frederic Weisbecker
2017-06-07 21:36 ` Levin, Alexander (Sasha Levin)
2017-06-08 19:07 ` [PATCH] nohz: Fix spurious warning when hrtimer and clockevent get out of sync Frederic Weisbecker
2017-06-08 22:13 ` Levin, Alexander (Sasha Levin)
2017-06-09 0:48 ` Frederic Weisbecker
2017-06-09 12:13 ` Levin, Alexander (Sasha Levin)
2017-06-09 12:26 ` Peter Zijlstra
2017-06-09 13:06 ` Frederic Weisbecker
2017-04-24 8:08 ` [PATCH 0/2] nohz: Deal with clock reprogram skipping issues v2 Ingo Molnar
2017-04-24 14:04 ` Frederic Weisbecker
2017-04-24 14:45 ` Ingo Molnar
2017-04-26 14:55 ` Frederic Weisbecker
2017-04-26 18:49 ` Ingo Molnar
2017-04-26 21:07 ` Frederic Weisbecker
2017-04-24 17:01 ` [tip:timers/urgent] nohz: Print more debug info in tick_nohz_stop_sched_tick() tip-bot for Frederic Weisbecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-22aa2ad45fd8a6ef56eb60038fc0ac7059c0a986@git.kernel.org \
--to=tipbot@zytor.com \
--cc=fweisbec@gmail.com \
--cc=hartsjc@redhat.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=pavel@ucw.cz \
--cc=peterz@infradead.org \
--cc=riel@redhat.com \
--cc=tglx@linutronix.de \
--cc=tim@binbash.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).