Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751164AbdFCMmu (ORCPT ); Sat, 3 Jun 2017 08:42:50 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:34138 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750765AbdFCMms (ORCPT ); Sat, 3 Jun 2017 08:42:48 -0400 Date: Sat, 3 Jun 2017 14:42:43 +0200 From: Frederic Weisbecker To: "Levin, Alexander (Sasha Levin)" Cc: Thomas Gleixner , Ingo Molnar , LKML , Peter Zijlstra , Rik van Riel , James Hartsock , "stable@vger.kernel.org" , Tim Wright , Pavel Machek Subject: Re: [PATCH 2/2] tick: Make sure tick timer is active when bypassing reprogramming Message-ID: <20170603124237.GA25077@lerouge> References: <1492783255-5051-1-git-send-email-fweisbec@gmail.com> <1492783255-5051-3-git-send-email-fweisbec@gmail.com> <20170603080638.7okm4ztp7zuphc4b@sasha-lappy> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170603080638.7okm4ztp7zuphc4b@sasha-lappy> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1026 Lines: 27 On Sat, Jun 03, 2017 at 08:06:41AM +0000, Levin, Alexander (Sasha Levin) wrote: > On Fri, Apr 21, 2017 at 04:00:55PM +0200, Frederic Weisbecker wrote: > > 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); > > + } > > I seem to be hitting that in a KVM vm, even without load (sometimes > right after boot): Ah, can you tell me which tree you were using? Is it tip/master? Can you give me its HEAD and your config file? Thanks