Re: [PATCH] nohz: Fix spurious warning when hrtimer and clockevent get out of sync

From: Frederic Weisbecker
Date: Thu Jun 08 2017 - 20:49:34 EST


On Thu, Jun 08, 2017 at 10:13:38PM +0000, Levin, Alexander (Sasha Levin) wrote:
> On Thu, Jun 08, 2017 at 09:07:05PM +0200, Frederic Weisbecker wrote:
> > Awesome, these traces have been very helpful! So now I think I get what's going on.
> > Can you please test the following fix?
>
> With the patch, I hit the warning early on boot:
>
> [ 1.423727] clocksource: Switched to clocksource kvm-clock
> [ 1.429326] ------------[ cut here ]------------
> [ 1.430234] WARNING: CPU: 1 PID: 0 at kernel/time/tick-sched.c:792 __tick_nohz_idle_enter+0xe1c/0x15c0

Oh sorry, I inverted some conditional. It warns as soon as the tick is completely stopped
and not just deferred, which seldom happen on my testbox.

I need to learn programming again.

Here is the fixed version:

---