Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp473273rdb; Thu, 22 Feb 2024 09:12:47 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUZ9LCXdlK3WU+WteaLS6hYt/zRl9an0vdlMke82pha+ThwcTFL9CWNmjnU47hdspXPGZBV9+pSV4wudG/IFLENZfey4i+Utje4c05/AQ== X-Google-Smtp-Source: AGHT+IHuPu9YMSR78OwgVYo9rQ8zfqRcNsWkicSd1iSV9K5y3DWcTR6LvhrEMW2gGh3hDv2Ms5DA X-Received: by 2002:a17:903:986:b0:1db:db5e:6712 with SMTP id mb6-20020a170903098600b001dbdb5e6712mr17955963plb.58.1708621966923; Thu, 22 Feb 2024 09:12:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708621966; cv=pass; d=google.com; s=arc-20160816; b=A9z0IKNnwJ37X1b4u5HG64IppThm1fO/lNatzPDkFgdz+yjZNiWrW8/h6LrQxStgw/ 7Xj/dJ79oznaVLSAs0aVCOYPkwbHhxvel88sayP3qvJ3uVuitBkGLLjbnBdiiVse0kit udPUeosI7jkGQkB1UBGYTvK2Bj84OrostHxNpfDJWtQlgliyRwi+BcV2jxTIMu2TFwBx 6eIFsIASbXt/DFQdCph+3GeXcprLr19NbPqeirX6jRsCZKe/v5LXLRoeXVelRdjEYgrs 6cu5YhbjwvdoDW9vNLaZ+OjNWIx/ElcqBHLag63Hyn5ru0cc5QLaDcO6twgqICnhCqyF ODAg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=gKk3ao8eGgoRzZ3lnCXps17lYVWahMhm8Z5PwB6wqqI=; fh=IdquJyaazQ3wXWxdOExnpctJRLX4Jw3HEb/tnyKonzY=; b=z/smB53r0kAyGoeyzharxn4J61OuA0L9xO76inX5VvbPFP/jqYp7Sl26wTup5CaTLq FdSPea2Ok2Z7ame4ZWl1S0o36sgMJWCxlOBGJ6UZ7U4aHHk6k42FZWu79lJbkyA2JypF fjfAMVjqKJwWYaQQFAm1f79x5FQY6eVsjcoPAIz3rGyqgD5sKZ+T4L8jH4FsdDVUU10K sPrClBnPfSQew1LV2AmjyT+o8QpiZlPRGpe1CmN8U58hyRv5/k5sBGtXSQYePELbInBV mJUD0jF+tJGrGUn0+iJxCh+kwlLQypZRY+ryQ6YMIreuAVot9blvm1DHYjE6LXeVESjL YNEQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=qTui1JCW; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-76936-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76936-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id e17-20020a170902ef5100b001d721475ff1si674530plx.106.2024.02.22.09.12.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 09:12:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76936-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=qTui1JCW; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-76936-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76936-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 8E12928B570 for ; Thu, 22 Feb 2024 17:12:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 46929154C0D; Thu, 22 Feb 2024 17:12:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="qTui1JCW"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="BHYcyft0" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A3EF0155303; Thu, 22 Feb 2024 17:12:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708621932; cv=none; b=HumZhIFHvdLOoKLcR7QCU1irMREI9NY+U/NpCl9r8HVBpF1iBQjpVUN7GBdBSmbpVs+uHdOoZ+/pJqHQFV9P0Rmp6GNIq1jU3/h0c5xTEJkuBawtztuYLEshXLx4Koqj/0QouvysxyTSTtYpvWN95OINxMlX7uDqoPS+xctfHnQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708621932; c=relaxed/simple; bh=Y/SgF6ItigDqjLcf85DykyReMmOGZlYFxEVznB+HBmI=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=c+ougTfVuiy8nyjvAM1+2QArgRG6AXfcd/NPg8BbAeiiZB72t4BDFbY3NiefCRfW2nPpPdGdPPIHOhxxKjMsaLFOyIVzlpv4uOLvZvFAM6DeN/wgwzMieM6dOM4QbSMkZEBtkvzeBrJY/RRUTAEEjgH7KGjsLp8jlc4UicV0g4Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=qTui1JCW; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=BHYcyft0; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Thu, 22 Feb 2024 17:12:08 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708621928; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gKk3ao8eGgoRzZ3lnCXps17lYVWahMhm8Z5PwB6wqqI=; b=qTui1JCWB4NPagVO5wrDvRioMnr7Rb3FEoJIIu+6LOxu7kdZ5lWXlHjlxUj5WIPmAdKWQx qQ105uytcKDZyTE1N7MBlWvZ9nJeeB2fH+gq7KyTBdLuxqjEHh1+s5ACHq73vBHAzJ7cuO C+/eTLCtxVOuR6VPfjL2hbxBueskjXwtsCOczWkfd7nvZ50ZCPVix3qiviEisP3qssJ+PQ +Tnf7COG5KOn1/I+eRKR2lCFDxv8oV3hGi5UakfOH5Ce/s01F2h0PmVTu3CcSYPri2Aym6 gaLjeJe4ASbp+NjemlqBSOk1O3OZtG3oTsHHxcFA+zLgr8jp49fRPQa5UqRxsQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708621928; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gKk3ao8eGgoRzZ3lnCXps17lYVWahMhm8Z5PwB6wqqI=; b=BHYcyft0zdHIQ3ejlax7QvoKeAWRlpTAEEavMjsG+ETo5raAxMbLWbRLlT1Gd6I4UqIxFt YWP5s7VP2pseQYAg== From: "tip-bot2 for Anna-Maria Behnsen" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] timers: Check if timers base is handled already Cc: "Anna-Maria Behnsen" , Thomas Gleixner , Frederic Weisbecker , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240221090548.36600-16-anna-maria@linutronix.de> References: <20240221090548.36600-16-anna-maria@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <170862192800.398.8318015316746640187.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit The following commit has been merged into the timers/core branch of tip: Commit-ID: 89f01e10c99a5ca2ff88b545fad763d360cdbfc8 Gitweb: https://git.kernel.org/tip/89f01e10c99a5ca2ff88b545fad763d360cdbfc8 Author: Anna-Maria Behnsen AuthorDate: Wed, 21 Feb 2024 10:05:43 +01:00 Committer: Thomas Gleixner CommitterDate: Thu, 22 Feb 2024 17:52:32 +01:00 timers: Check if timers base is handled already 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 Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20240221090548.36600-16-anna-maria@linutronix.de --- kernel/time/timer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/time/timer.c b/kernel/time/timer.c index 51053af..4420cdf 100644 --- a/kernel/time/timer.c +++ b/kernel/time/timer.c @@ -2285,6 +2285,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);