From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933355AbdDSHHT (ORCPT ); Wed, 19 Apr 2017 03:07:19 -0400 Received: from merlin.infradead.org ([205.233.59.134]:51954 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933339AbdDSHHM (ORCPT ); Wed, 19 Apr 2017 03:07:12 -0400 Date: Wed, 19 Apr 2017 09:07:04 +0200 From: Peter Zijlstra To: Thomas Gleixner Cc: LKML , John Stultz , Eric Dumazet , Anna-Maria Gleixner , "Rafael J. Wysocki" , linux-pm@vger.kernel.org, Arjan van de Ven , "Paul E. McKenney" , Frederic Weisbecker , Rik van Riel , Richard Cochran Subject: Re: [patch V2 06/10] timer: Restructure internal locking Message-ID: <20170419070704.b6f7cdej4uxxhd5w@hirez.programming.kicks-ass.net> References: <20170418111102.490432548@linutronix.de> <20170418111400.856441536@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170418111400.856441536@linutronix.de> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 18, 2017 at 01:11:08PM +0200, Thomas Gleixner wrote: > +++ b/kernel/time/timer.c > @@ -1651,17 +1651,14 @@ void update_process_times(int user_tick) > /** > * __run_timers - run all expired timers (if any) on this CPU. > * @base: the timer vector to be processed. > + * > + * Caller must hold the base lock. > */ > static inline void __run_timers(struct timer_base *base) > { > struct hlist_head heads[LVL_DEPTH]; > int levels; > > - if (!time_after_eq(jiffies, base->clk)) > - return; > - > - spin_lock_irq(&base->lock); > - lockdep_assert_held(&base->lock); Is so ever much more useful than a comment. > while (time_after_eq(jiffies, base->clk)) { > > levels = collect_expired_timers(base, heads);