From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752714AbbE0FjZ (ORCPT ); Wed, 27 May 2015 01:39:25 -0400 Received: from mail-pd0-f181.google.com ([209.85.192.181]:35824 "EHLO mail-pd0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750977AbbE0FjY (ORCPT ); Wed, 27 May 2015 01:39:24 -0400 Date: Wed, 27 May 2015 11:09:19 +0530 From: Viresh Kumar To: Thomas Gleixner Cc: LKML , Ingo Molnar , Peter Zijlstra , Paul McKenney , Frederic Weisbecker , Eric Dumazet , John Stultz , Joonwoo Park , Wenbo Wang Subject: Re: [patch 1/7] timers: Sanitize catchup_timer_jiffies() usage Message-ID: <20150527053919.GD31085@linux> References: <20150526210723.245729529@linutronix.de> <20150526224511.662994644@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150526224511.662994644@linutronix.de> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 26-05-15, 22:50, Thomas Gleixner wrote: > 3) __run_timers() > > We only check on entry, which is silly, because base->timer_jiffies > can be behind - especially on NOHZ kernels - and if there is a > single deferrable timer somewhere between base->timer_jiffies and > jiffies we expire it and then loop until base->timer_jiffies == > jiffies. This may be incorrect. Once we expire that single deferrable timer, we call detach_expired_timer(), which calls catchup_timer_jiffies() at its end. And so the following loop should end right away, isn't it ? while (time_after_eq(jiffies, base->timer_jiffies)) > +++ tip/kernel/time/timer.c > -static bool catchup_timer_jiffies(struct tvec_base *base) > +static inline bool catchup_timer_jiffies(struct tvec_base *base) There is only one user left for this routine now, i.e. __run_timers(). Should we drop this routine ? -- viresh