Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S947167AbdDTTkY (ORCPT ); Thu, 20 Apr 2017 15:40:24 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:36782 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S947128AbdDTTkV (ORCPT ); Thu, 20 Apr 2017 15:40:21 -0400 Date: Thu, 20 Apr 2017 21:40:12 +0200 (CEST) From: Thomas Gleixner To: Frederic Weisbecker cc: 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 In-Reply-To: <20170420182900.GE25160@lerouge> Message-ID: References: <1492702230-28462-1-git-send-email-fweisbec@gmail.com> <1492702230-28462-3-git-send-email-fweisbec@gmail.com> <20170420182900.GE25160@lerouge> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 964 Lines: 33 On Thu, 20 Apr 2017, Frederic Weisbecker wrote: > On Thu, Apr 20, 2017 at 07:56:22PM +0200, Thomas Gleixner wrote: > > > /* Skip reprogram of event if its not changed */ > > > - if (ts->tick_stopped && (expires == ts->next_tick)) > > > + if (ts->tick_stopped && (expires == ts->next_tick)) { > > > + WARN_ON_ONCE(dev->next_event > ts->next_tick); > > > > What about handling it proper ? dev->next_event might be KTIME_MAX, > > i.e. no more event for the next 500+ years. > > I thought I handled this case, what I'm I missing? if (ts->tick_stopped && (expires == ts->next_tick)) { WARN_ON_ONCE(dev->next_event > ts->next_tick); goto out; } IOW, the WARN_ON yells in dmesg, but despite seing the wreckage it just leaves it and goes out doing nothing. Why can't you just do if (ts->tick_stopped && (expires == ts->next_tick)) { if (dev->next_event > ts->next_tick)) { WARN_ONCE(); do_something_sensible(); } goto out; } Hmm? tglx