Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753900AbbFSNXw (ORCPT ); Fri, 19 Jun 2015 09:23:52 -0400 Received: from terminus.zytor.com ([198.137.202.10]:45979 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752883AbbFSNXn (ORCPT ); Fri, 19 Jun 2015 09:23:43 -0400 Date: Fri, 19 Jun 2015 06:22:44 -0700 From: tip-bot for Thomas Gleixner Message-ID: Cc: edumazet@google.com, paulmck@linux.vnet.ibm.com, john.stultz@linaro.org, linux-kernel@vger.kernel.org, linux@horizon.com, hpa@zytor.com, mingo@kernel.org, fweisbec@gmail.com, viresh.kumar@linaro.org, tglx@linutronix.de, joonwoop@codeaurora.org, wenbo.wang@memblaze.com, peterz@infradead.org Reply-To: peterz@infradead.org, wenbo.wang@memblaze.com, joonwoop@codeaurora.org, tglx@linutronix.de, viresh.kumar@linaro.org, fweisbec@gmail.com, mingo@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org, linux@horizon.com, john.stultz@linaro.org, edumazet@google.com, paulmck@linux.vnet.ibm.com In-Reply-To: <20150526224511.757520403@linutronix.de> References: <20150526224511.757520403@linutronix.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:timers/core] timer: Remove FIFO "guarantee" Git-Commit-ID: 1bd04bf6f68d65f5422b2b85c495d65d49587a54 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2541 Lines: 69 Commit-ID: 1bd04bf6f68d65f5422b2b85c495d65d49587a54 Gitweb: http://git.kernel.org/tip/1bd04bf6f68d65f5422b2b85c495d65d49587a54 Author: Thomas Gleixner AuthorDate: Tue, 26 May 2015 22:50:26 +0000 Committer: Thomas Gleixner CommitDate: Fri, 19 Jun 2015 15:18:27 +0200 timer: Remove FIFO "guarantee" The FIFO guarantee is only there if two timers are queued into the same bucket at the same jiffie on the same cpu: - The slack value depends on the delta between expiry and enqueue time, so the resulting expiry time can be different for timers which are queued in different jiffies. - Timers which are queued into the secondary array end up after a later queued timer which was queued into the primary array due to cascading. - Timers can end up on different cpus due to the NOHZ target moving around. Obviously there is no guarantee of expiry ordering between cpus. So anything which relies on FIFO behaviour of the timer wheel is broken already. This is a preparatory patch for converting the timer wheel to hlist which reduces the memory foot print of the wheel by 50%. It's a seperate patch so any (unlikely to happen) regression caused by this can be identified clearly. Signed-off-by: Thomas Gleixner Reviewed-by: Viresh Kumar Cc: Peter Zijlstra Cc: Paul McKenney Cc: Frederic Weisbecker Cc: Eric Dumazet Cc: John Stultz Cc: Joonwoo Park Cc: Wenbo Wang Cc: George Spelvin Link: http://lkml.kernel.org/r/20150526224511.757520403@linutronix.de Signed-off-by: Thomas Gleixner --- kernel/time/timer.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kernel/time/timer.c b/kernel/time/timer.c index d5e0179..e212df2 100644 --- a/kernel/time/timer.c +++ b/kernel/time/timer.c @@ -389,10 +389,8 @@ __internal_add_timer(struct tvec_base *base, struct timer_list *timer) i = (expires >> (TVR_BITS + 3 * TVN_BITS)) & TVN_MASK; vec = base->tv5.vec + i; } - /* - * Timers are FIFO: - */ - list_add_tail(&timer->entry, vec); + + list_add(&timer->entry, vec); } static void internal_add_timer(struct tvec_base *base, struct timer_list *timer) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/