From: John Stultz <john.stultz@linaro.org>
To: LKML <linux-kernel@vger.kernel.org>
Cc: John Stultz <john.stultz@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: [PATCH] time: Revert to calling clock_was_set_delayed() while in irq context
Date: Thu, 27 Mar 2014 16:30:49 -0700 [thread overview]
Message-ID: <1395963049-11923-1-git-send-email-john.stultz@linaro.org> (raw)
Ingo,
After testing a patch queued for 3.15, I noticed there was a WARNON
message that I realized was triggered by one of my patches that came
in the 3.14 merge window. I'm not very happy to find this now, but
sadly here it is. The fix is luckily fairly simple and just falls
back to previous behavior.
For tip/timers/urgent.
thanks
-john
In commit 47a1b796306356f35 (tick/timekeeping: Call update_wall_time
outside the jiffies lock), we moved to calling clock_was_set() due
to the fact that we were no longer holding the timekeeping or jiffies
lock.
However, there is still the problem that clock_was_set() triggers
an IPI, which cannot be done from the timer's hard irq context,
and will generate WARN_ON warnings.
Apparently in my earlier testing, I'm guessing I didn't bump the dmesg
log level, so I somehow missed the WARN_ONs.
Thus we need to revert back to calling clock_was_set_delayed().
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
---
kernel/time/timekeeping.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 0aa4ce8..5b40279 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -1435,7 +1435,8 @@ void update_wall_time(void)
out:
raw_spin_unlock_irqrestore(&timekeeper_lock, flags);
if (clock_set)
- clock_was_set();
+ /* Have to call _delayed version, since in irq context*/
+ clock_was_set_delayed();
}
/**
--
1.8.3.2
next reply other threads:[~2014-03-27 23:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-27 23:30 John Stultz [this message]
2014-03-28 7:07 ` Ingo Molnar
2014-03-28 8:37 ` [tip:timers/urgent] time: Revert to calling clock_was_set_delayed () " tip-bot for John Stultz
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=1395963049-11923-1-git-send-email-john.stultz@linaro.org \
--to=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/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
all inboxes | Powered by JetHome®