From: Thomas Gleixner <tglx@linutronix.de>
To: Fengguang Wu <fengguang.wu@intel.com>
Cc: LKP <lkp@01.org>, Huang Ying <ying.huang@intel.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [hrtimer] WARNING: CPU: 0 PID: 0 at kernel/time/clockevents.c:318 clockevents_program_event()
Date: Thu, 16 Apr 2015 12:47:55 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.11.1504161246440.3845@nanos> (raw)
In-Reply-To: <20150416033736.GC31571@wfg-t540p.sh.intel.com>
On Thu, 16 Apr 2015, Fengguang Wu wrote:
> Hi Thomas,
>
> 0day kernel testing robot got the below dmesg and the first bad commit is
Thanks for the report. I found the issue and pushed the fix to
timers/wip. Patch below.
Thanks,
tglx
commit 0385d021dfeec82fdc94b4be5e74f45ababa7d73
Author: Thomas Gleixner <tglx@linutronix.de>
Date: Thu Apr 16 12:42:04 2015 +0200
tick: Prevent periodic handler from stomping over highres/nohz mode
We switch to highres/nohz from the hard interrupt context now. So the
periodic handler will see event mode periodic and try to reschedule
the timer interrupt. But that's not what we want as the hrtimer/nohz
code is taking care of it. Check whether the eventhandler has changed
and return.
Needs to be folded back for the final merge.
Fixes: 8ca99a56579 'hrtimer: Get rid of hrtimer softirq'
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c
index 3ae6afa1eb98..ea5f9eae8f74 100644
--- a/kernel/time/tick-common.c
+++ b/kernel/time/tick-common.c
@@ -102,6 +102,16 @@ void tick_handle_periodic(struct clock_event_device *dev)
tick_periodic(cpu);
+#if defined(CONFIG_HIGH_RES_TIMERS) || defined(CONFIG_NO_HZ_COMMON)
+ /*
+ * The cpu might have transitioned to HIGHRES or NOHZ mode via
+ * update_process_times() -> run_local_timers() ->
+ * hrtimer_run_queues().
+ */
+ if (dev->event_handler != tick_handle_periodic)
+ return;
+#endif
+
if (dev->state != CLOCK_EVT_STATE_ONESHOT)
return;
for (;;) {
prev parent reply other threads:[~2015-04-16 10:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-16 3:37 Fengguang Wu
2015-04-16 10:47 ` Thomas Gleixner [this message]
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=alpine.DEB.2.11.1504161246440.3845@nanos \
--to=tglx@linutronix.de \
--cc=fengguang.wu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@01.org \
--cc=ying.huang@intel.com \
/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®