Received: by 2002:a05:7412:d024:b0:f9:90c9:de9f with SMTP id bd36csp134974rdb; Wed, 20 Dec 2023 08:08:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IE/5m7VoW21laiP33HzjRBVKiRTsTG2fWbg1MflWXmlc6DkncPVf7hP2EG0S4flTa5r8QUr X-Received: by 2002:a05:6870:fba1:b0:204:fca:ce23 with SMTP id kv33-20020a056870fba100b002040fcace23mr1238693oab.28.1703088479840; Wed, 20 Dec 2023 08:07:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703088479; cv=none; d=google.com; s=arc-20160816; b=GTZmFzAfI93/PqFbeAh+RY6qgzrLqDWqaaeX9MI7GYdqxDO7Wj4aXCyCx0fLYRS0qd 7e2G9DY6j0R6gPdnerE57ICc3ppXKj+/O8KqNN8EOoG/f1DcJwd84ZKCgT0B6xnaJSGf jsQt0gFTc5ga7/NgBV6uOX63vWHF0/XIs20/C6IGnL1pdZP0tEi9YCRKzIuwQvvhtG8R OaKKTy7RuRLtK4mN3VxzWfGOG6zWBToaTiG1ikfHvBMLyYL2Ie8zKgTDnkC/BJJoRRI/ l6XnT7FN1hWOTafNXtArWB5DfFA4XKwcmegy9mh6RhcgxSc2g1qxy4LaWO2zQx8bHX/U wSjw== ARC-Message-Signature: i=1; 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=232aJJhHA3GkLoMcpuCeUflrMMOWDdohu1QKRUm1Q2Q=; fh=IdquJyaazQ3wXWxdOExnpctJRLX4Jw3HEb/tnyKonzY=; b=JmpBq7J7rZzOjSDN3dTJvipiNq3YYuu8JO0mE3eCTJuPbt5lrJNfESJA+30EOAhzJE X8Vn3iTjyUpg9ASQ9Nf8ONLCxpmKgJ7C3rAWV9HyzvRPgyElqBYU2HPhkDDsakjVUOQX 1mBBvjSnOYZ3L6BckP8nc6qHcTjhp4LFKUk8WpIFpMHj1kBQfGTql0ZYDJAWLuaDhXLL WVc1hw44HzxP7eueJ7QSv5yUzXItUNd73xlNVMsLYZKvTAn/AOS12VzhfKWyY6XbcF+z t8bW79cQV/AqYbkFA7y+DpH0f0KtD3IAtGjRsP9BWwXlt++/xBYHbB6VDJ1h3RapxDIw DKWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=gCumy64a; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=ZigY6SB8; spf=pass (google.com: domain of linux-kernel+bounces-7230-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7230-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id bw26-20020a056a02049a00b005cdaa16ac01si4766663pgb.705.2023.12.20.08.07.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 08:07:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-7230-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=gCumy64a; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=ZigY6SB8; spf=pass (google.com: domain of linux-kernel+bounces-7230-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7230-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id B7D5CB24FED for ; Wed, 20 Dec 2023 16:01:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 97A3E495D8; Wed, 20 Dec 2023 15:59:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="gCumy64a"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ZigY6SB8" X-Original-To: linux-kernel@vger.kernel.org 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 675A4481AE; Wed, 20 Dec 2023 15:59:11 +0000 (UTC) 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: Wed, 20 Dec 2023 15:59:08 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1703087949; 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=232aJJhHA3GkLoMcpuCeUflrMMOWDdohu1QKRUm1Q2Q=; b=gCumy64aKzoiwepfogegHuAFT4Om1Xq1uYNygLY1GpZzDeQbLccOkCgR/3uivmrZpw3bEf lhHT4/rgQe9hku120gzt3xnI8FH7Hr1twVgZlWZ01YT/BWUrKAdDsxgbwM61I51h6Up4xW 0bcJz9foyA6wku+89iM/QOggNyAtDHYMg8QpP3nFBHU7r648vh4H6IwGEmsxRFNj026og2 6jW+niRvyNsUm2j/2TPSpVFcyu8G4ufEMCfFFRwxu3KZKBWKFVxLT5dvaQMiOGxng5kcPB fNeb2ozFNMgcOpXXhD0TZFz02a2hiDMNbcg8kG0Oul0lQiVRKaJKXvhD8pa2dw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1703087949; 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=232aJJhHA3GkLoMcpuCeUflrMMOWDdohu1QKRUm1Q2Q=; b=ZigY6SB8h0ztDUA6FpCo+GMMFDOfcubd/HW1ov5ZeoSDdb5gwJq8Ni3PAx+x4KEx/CxI9N 7Qm+xNX1eGtElKCw== 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: Move store of next event into __next_timer_interrupt() Cc: "Anna-Maria Behnsen" , Thomas Gleixner , Frederic Weisbecker , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20231201092654.34614-8-anna-maria@linutronix.de> References: <20231201092654.34614-8-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: <170308794894.398.9108657349388521150.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: b5e6f59888c7bde3c05f61b3ce06b78a86713fc0 Gitweb: https://git.kernel.org/tip/b5e6f59888c7bde3c05f61b3ce06b78a86713fc0 Author: Anna-Maria Behnsen AuthorDate: Fri, 01 Dec 2023 10:26:29 +01:00 Committer: Thomas Gleixner CommitterDate: Wed, 20 Dec 2023 16:49:38 +01:00 timers: Move store of next event into __next_timer_interrupt() Both call sites of __next_timer_interrupt() store the return value directly in base->next_expiry. Move the store into __next_timer_interrupt() and to make its purpose more clear, rename the function to next_expiry_recalc(). No functional change. Signed-off-by: Anna-Maria Behnsen Signed-off-by: Thomas Gleixner Reviewed-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20231201092654.34614-8-anna-maria@linutronix.de --- kernel/time/timer.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/kernel/time/timer.c b/kernel/time/timer.c index 9188205..490ff8e 100644 --- a/kernel/time/timer.c +++ b/kernel/time/timer.c @@ -1800,8 +1800,10 @@ static int next_pending_bucket(struct timer_base *base, unsigned offset, /* * Search the first expiring timer in the various clock levels. Caller must * hold base->lock. + * + * Store next expiry time in base->next_expiry. */ -static unsigned long __next_timer_interrupt(struct timer_base *base) +static void next_expiry_recalc(struct timer_base *base) { unsigned long clk, next, adj; unsigned lvl, offset = 0; @@ -1867,10 +1869,9 @@ static unsigned long __next_timer_interrupt(struct timer_base *base) clk += adj; } + base->next_expiry = next; base->next_expiry_recalc = false; base->timers_pending = !(next == base->clk + NEXT_TIMER_MAX_DELTA); - - return next; } #ifdef CONFIG_NO_HZ_COMMON @@ -1930,7 +1931,7 @@ u64 get_next_timer_interrupt(unsigned long basej, u64 basem) raw_spin_lock(&base->lock); if (base->next_expiry_recalc) - base->next_expiry = __next_timer_interrupt(base); + next_expiry_recalc(base); nextevt = base->next_expiry; /* @@ -2021,7 +2022,7 @@ static inline void __run_timers(struct timer_base *base) WARN_ON_ONCE(!levels && !base->next_expiry_recalc && base->timers_pending); base->clk++; - base->next_expiry = __next_timer_interrupt(base); + next_expiry_recalc(base); while (levels--) expire_timers(base, heads + levels);