lkml.org 
[lkml]   [2015]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [hrtimer] WARNING: CPU: 0 PID: 0 at kernel/time/clockevents.c:318 clockevents_program_event()
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 (;;) {




\
 
 \ /
  Last update: 2015-04-16 13:21    [W:0.040 / U:2.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site