Message ID | 20230524070629.6377-18-anna-maria@linutronix.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2651096vqo; Wed, 24 May 2023 00:11:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7SL17ugU3CRjjnq7r/Iwvjq1XWLcUy77j268jRt/wlnYF/4HVPfjVbDV9yIsWp+zk42v0W X-Received: by 2002:a17:902:c111:b0:1ab:1b8:8a5f with SMTP id 17-20020a170902c11100b001ab01b88a5fmr15085848pli.33.1684912265173; Wed, 24 May 2023 00:11:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684912265; cv=none; d=google.com; s=arc-20160816; b=wL/E+p0K19RJaKwMBvmURnxD4gqN8kgMstfLAeVNBSYNsYSvI2HueJCIZhvFkSFmGb qDBsUu/UQOnDc3oFzmiJCUqRNzMv/5YUCPcAqK9bnvQUw3488Gq2yC55/VfEggxxA13m qhFPP1WPkwWGJQt5tBP5CwItoxwA+fAG7LeudztHAvcyy9o6xT1pWeLS2RT0jUYX0XwB 7ZtOqmVtGfQisayW/WAP/acaxu5TOMNya86m68279PDqHeManBqIVAQ/ON5vHrMaBaOs 9P1pbVS1aOmdAw73wEENjkZbOsYys8Ah3OaMIl4SOUfthoV3qscF6oxIa9rIMvVBQNtV zc/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:dkim-signature :dkim-signature:from; bh=qCLAKadcYOZy8B4KFbVXg+LyGdFwzMy0r154VhivR5o=; b=cYJDZeOw48lKhcAR9rEniRCtl+oQkfv1JmB7jMMlsV89eyvf70YDgrK4DTfQSZJ2HS Pqa109tvF/GDIU0/zlu34mnw5w/idVwHnLnLXA4vmBCzZqCSMbHEwvxWU1jxMGIiSry+ QqgoJxN/xQv5S0tvBLubCX7MVT+l6nfPfRxVkkhle2wY0IdX4dHa4E3lWiZznnhb1zyW cx6nlA9Jg6KlA5M8NgNjd/Db55HkIt1IrH/ktamSfSzngK8p8rYzdoIRuYHbmJ8PrI6S 4mygfcpUzd0yK9b4aM0mwnhr8a2087p+Tx/tuxq1x6S1IyjiFkU4jUZ0stXjiWlQvpXf lCUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=tHFqHdu2; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=kgRbb+1b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 21-20020a170902c21500b001a6d4eab493si1860640pll.26.2023.05.24.00.10.53; Wed, 24 May 2023 00:11:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=tHFqHdu2; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=kgRbb+1b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239975AbjEXHIW (ORCPT <rfc822;ahmedalshaiji.dev@gmail.com> + 99 others); Wed, 24 May 2023 03:08:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239912AbjEXHHk (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 24 May 2023 03:07:40 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 011A4E6 for <linux-kernel@vger.kernel.org>; Wed, 24 May 2023 00:07:06 -0700 (PDT) From: Anna-Maria Behnsen <anna-maria@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1684912025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qCLAKadcYOZy8B4KFbVXg+LyGdFwzMy0r154VhivR5o=; b=tHFqHdu20MXPAtpTRsfPwWNCbJztGEDXzxOplx9XGBrL3C7BfZWGQtFFfGYTlB//V2DEhR 9MsIKWOSexeT5+cBj4L+WmPYG0q13mwHDfbqMks0hIKqapcuzyyBLpblAXrgfIVPaa2LGL DRBetaRFUiLbawOwdu4+yG+2n/X918H+VEFe691uHIlC5AYM3EiAaP2pr7/cZ5qXMsobgf Bx3QoAsWsQQzqKuHTFKg16c3t1W4Jo2PtjrmXPLz64QR9Lyw8wBdaPaXS11/tQe1jBEcBh lUwlZgGBX+YsDBL5u1LNiyGnNQrKAYceYMCX4OaNU8jRCmpTJlWHvarvOzE73w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1684912025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qCLAKadcYOZy8B4KFbVXg+LyGdFwzMy0r154VhivR5o=; b=kgRbb+1b+la7MSqatrlHvx+mu/1T9qsoiBvm94x+G6Yg8dKw7GjUSDxT5O+joLO9aWiuCW VIb6eGjqyNj2zSDw== To: linux-kernel@vger.kernel.org Cc: Peter Zijlstra <peterz@infradead.org>, John Stultz <jstultz@google.com>, Thomas Gleixner <tglx@linutronix.de>, Eric Dumazet <edumazet@google.com>, "Rafael J . Wysocki" <rafael.j.wysocki@intel.com>, Arjan van de Ven <arjan@infradead.org>, "Paul E . McKenney" <paulmck@kernel.org>, Frederic Weisbecker <fweisbec@gmail.com>, Rik van Riel <riel@surriel.com>, Steven Rostedt <rostedt@goodmis.org>, Sebastian Siewior <bigeasy@linutronix.de>, Giovanni Gherdovich <ggherdovich@suse.cz>, Lukasz Luba <lukasz.luba@arm.com>, "Gautham R . Shenoy" <gautham.shenoy@amd.com>, Anna-Maria Behnsen <anna-maria@linutronix.de> Subject: [PATCH v7 17/21] timer: Check if timers base is handled already Date: Wed, 24 May 2023 09:06:25 +0200 Message-Id: <20230524070629.6377-18-anna-maria@linutronix.de> In-Reply-To: <20230524070629.6377-1-anna-maria@linutronix.de> References: <20230524070629.6377-1-anna-maria@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766758563105466754?= X-GMAIL-MSGID: =?utf-8?q?1766758563105466754?= |
Series |
timer: Move from a push remote at enqueue to a pull at expiry model
|
|
Commit Message
Anna-Maria Behnsen
May 24, 2023, 7:06 a.m. UTC
Due to the conversion of the NOHZ timer placement to a pull at expiry
time model, the per CPU timer bases with non pinned timers are no
longer handled only by the local CPU. In case a remote CPU already
expires the non pinned timers base of the local cpu, nothing more
needs to be done by the local CPU. A check at the begin of the expire
timers routine is required, because timer base lock is dropped before
executing the timer callback function.
This is a preparatory work, but has no functional impact right now.
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
---
v6: Drop double negation
---
kernel/time/timer.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/time/timer.c b/kernel/time/timer.c index 20106dad531a..c2d66fd4638f 100644 --- a/kernel/time/timer.c +++ b/kernel/time/timer.c @@ -2204,6 +2204,9 @@ static inline void __run_timers(struct timer_base *base) lockdep_assert_held(&base->lock); + if (base->running_timer) + return; + while (time_after_eq(jiffies, base->clk) && time_after_eq(jiffies, base->next_expiry)) { levels = collect_expired_timers(base, heads);