From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751506AbeAPDw3 (ORCPT + 1 other); Mon, 15 Jan 2018 22:52:29 -0500 Received: from terminus.zytor.com ([65.50.211.136]:44989 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750999AbeAPDw2 (ORCPT ); Mon, 15 Jan 2018 22:52:28 -0500 Date: Mon, 15 Jan 2018 19:49:07 -0800 From: tip-bot for Anna-Maria Gleixner Message-ID: Cc: torvalds@linux-foundation.org, hch@lst.de, tglx@linutronix.de, mingo@kernel.org, linux-kernel@vger.kernel.org, hpa@zytor.com, peterz@infradead.org, john.stultz@linaro.org, anna-maria@linutronix.de Reply-To: torvalds@linux-foundation.org, hch@lst.de, tglx@linutronix.de, john.stultz@linaro.org, anna-maria@linutronix.de, peterz@infradead.org, mingo@kernel.org, linux-kernel@vger.kernel.org, hpa@zytor.com In-Reply-To: <20171221104205.7269-22-anna-maria@linutronix.de> References: <20171221104205.7269-22-anna-maria@linutronix.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:timers/core] hrtimer: Make remote enqueue decision less restrictive Git-Commit-ID: 2ac2dccce9d16a7b1a8fddf69a955d249375bce4 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 Return-Path: Commit-ID: 2ac2dccce9d16a7b1a8fddf69a955d249375bce4 Gitweb: https://git.kernel.org/tip/2ac2dccce9d16a7b1a8fddf69a955d249375bce4 Author: Anna-Maria Gleixner AuthorDate: Thu, 21 Dec 2017 11:41:50 +0100 Committer: Ingo Molnar CommitDate: Tue, 16 Jan 2018 02:53:58 +0100 hrtimer: Make remote enqueue decision less restrictive The current decision whether a timer can be queued on a remote CPU checks for timer->expiry <= remote_cpu_base.expires_next. This is too restrictive because a timer with the same expiry time as an existing timer will be enqueued on right-hand size of the existing timer inside the rbtree, i.e. behind the first expiring timer. So its safe to allow enqueuing timers with the same expiry time as the first expiring timer on a remote CPU base. Signed-off-by: Anna-Maria Gleixner Cc: Christoph Hellwig Cc: John Stultz Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: keescook@chromium.org Link: http://lkml.kernel.org/r/20171221104205.7269-22-anna-maria@linutronix.de Signed-off-by: Ingo Molnar --- kernel/time/hrtimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index 1c68bf2..f4a56fb 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -168,7 +168,7 @@ hrtimer_check_target(struct hrtimer *timer, struct hrtimer_clock_base *new_base) ktime_t expires; expires = ktime_sub(hrtimer_get_expires(timer), new_base->offset); - return expires <= new_base->cpu_base->expires_next; + return expires < new_base->cpu_base->expires_next; } static inline