Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1041188AbdDUOuq (ORCPT ); Fri, 21 Apr 2017 10:50:46 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:36257 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1039187AbdDUOuj (ORCPT ); Fri, 21 Apr 2017 10:50:39 -0400 Date: Fri, 21 Apr 2017 16:43:59 +0200 From: Frederic Weisbecker To: Peter Zijlstra Cc: Thomas Gleixner , LKML , John Stultz , Eric Dumazet , Anna-Maria Gleixner , "Rafael J. Wysocki" , linux-pm@vger.kernel.org, Arjan van de Ven , "Paul E. McKenney" , Rik van Riel Subject: Re: [patch V2 03/10] timers: Rework idle logic Message-ID: <20170421144358.GC2586@lerouge> References: <20170418111102.490432548@linutronix.de> <20170418111400.589271247@linutronix.de> <20170419065039.nhmi5vrhydqy5ftw@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170419065039.nhmi5vrhydqy5ftw@hirez.programming.kicks-ass.net> 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: 1336 Lines: 31 On Wed, Apr 19, 2017 at 08:50:39AM +0200, Peter Zijlstra wrote: > On Tue, Apr 18, 2017 at 01:11:05PM +0200, Thomas Gleixner wrote: > > Storing next event and determining whether the base is idle can be done in > > __next_timer_interrupt(). > > > > Preparatory patch for new call sites which need this information as well. > > > > Signed-off-by: Thomas Gleixner > > --- > > kernel/time/timer.c | 43 ++++++++++++++++++++++++------------------- > > 1 file changed, 24 insertions(+), 19 deletions(-) > > > > --- a/kernel/time/timer.c > > +++ b/kernel/time/timer.c > > @@ -1358,8 +1358,11 @@ static int next_pending_bucket(struct ti > > /* > > * Search the first expiring timer in the various clock levels. Caller must > > * hold base->lock. > > + * > > + * Stores the next expiry time in base. The return value indicates whether > > + * the base is empty or not. > > */ > > -static unsigned long __next_timer_interrupt(struct timer_base *base) > > +static bool __next_timer_interrupt(struct timer_base *base) > > Can't say I'm a fan of this.. I sort of see where this is going, but the > fact remains that __next_timer_interrupt(), as a function, makes me > expect a return value of time/timer quantity. Maybe we can just do a rename like fetch_next_timer_interrupt() or update_next_timer_interrupt()?