Received: by 2002:a05:7412:8d11:b0:fa:4934:9f with SMTP id bj17csp569875rdb; Mon, 15 Jan 2024 06:38:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IGhByIByFv9JZJan78vV8w9dpfZgfKHelPnvRzLz6DmtFe5NXi+Sb3DqKhvSJAIXRBzJC8o X-Received: by 2002:a17:902:7c07:b0:1d4:e070:73c with SMTP id x7-20020a1709027c0700b001d4e070073cmr5586168pll.3.1705329495404; Mon, 15 Jan 2024 06:38:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705329495; cv=none; d=google.com; s=arc-20160816; b=Z/nC6C4OIbN2fzNh6W9j84q7tie+45k9C4lAzqAfAiI4QTKunZee0wRC8WhlBRdtPr x1WbwpxzpRhgLeaXiOujjZIHBM0+PI8IPQNPk1yWrqzymsrGHOfJXnE8a6+dpAiu5ITn 0iRK5veN7iPElA5+U1nQXjGVVC3zPjCl7SgM+he0UMAxXcqGS1hKVVW19pElgXdRtqGF gt6fnWFBHubLtVdgcqK7yYipkWAHycFiA4TnqXBDcFmPt3CzvEkdTXFtgDNkV6jBg1GO lnxc09oqDFhoL1SyDFHt/QVnxNb/wuaafTteL0w0BH63ZWYCeKKkN23Nma6/LaRcVrSI rk2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:dkim-signature:dkim-signature:from; bh=MI9g9MDbA2NFp7jgDttymOb2sC6nFxhp2a/RZS0Cubo=; fh=PG6uS4TiiUSDyl8D/joYkWbwCgDm4ug0ir2h7tHBJXQ=; b=itdn2L5Hvy3e95axhRwwGfM0f2UgK8KFpuHKdc3QcmO7j0bZS3XrFTDLQOirydrAc6 iczp6VxQbrK5GT4GdBX1yc4NXzBjFqbQmEIGiGer5W3L6zpUp5Lsg/izviaxkyZ1AWq+ VLALHX9UdIqOWZNlT4OEhDC0OQoRXD2VtWLaC1q439iIBV3m2Ch3byOgEz9iCP4Wuo0Z f5ra2akmi7jAv99d3oHf47eS7/fIx9O92eU0tJlQ3Rsmb4w0LfEE11bJzdbSrWrdk2dQ DcNcwDOIqMPhEK3XX7KY6Fly7DcQuWL9mjFunjlDEW7/IcfKYc5MGdFtYrL05aaa4VUu 16Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=dKME5u9Y; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel+bounces-26096-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26096-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 jw19-20020a170903279300b001d5ce993c9bsi2143128plb.471.2024.01.15.06.38.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 06:38:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-26096-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=dKME5u9Y; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel+bounces-26096-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26096-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 0E8472827DE for ; Mon, 15 Jan 2024 14:38:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EF6D61774D; Mon, 15 Jan 2024 14:38:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="dKME5u9Y"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="BZs3wXhs" 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 D62DD17738 for ; Mon, 15 Jan 2024 14:38:04 +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 From: Anna-Maria Behnsen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1705329482; 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=MI9g9MDbA2NFp7jgDttymOb2sC6nFxhp2a/RZS0Cubo=; b=dKME5u9YJRG9rJBXAK+YQgOciaQpeurM1q2gGo7H/jfxRnKrlC/PnxxVZXurGGwTY+rmXc Ldmk2exeCLEOEpJhE3PzGps785U+vNDBLqTn/GQfF9YZnpR4Do53XoTrYwb6bwo31kTeQq h5Qe4It9XifK89MSwYxtYcSB9Nzs91HFVu99rFZ/9GwT3OAZ4vD+fCvCr/ZJnam3Bv8wIc Gk+QuEUicMziS1+XSLjIyuAyU3+vIOjzIEnA5A01l4IoBk1rbkhl2sfMlrJnmB4Qpqgjgy +b1bwYF0jt3dKgrbnyUkhtZei+IqjaSTu/NHB2mzluaCybNsFaJTg6xgV+AxnQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1705329482; 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=MI9g9MDbA2NFp7jgDttymOb2sC6nFxhp2a/RZS0Cubo=; b=BZs3wXhsMMmkrUob5t5tgA7S+fbdHDyNyUea31/wUAg5nASEUBX78LfwVe21ZJgJzXKJGw ftF9HXeATwEkVvCQ== To: linux-kernel@vger.kernel.org Cc: Peter Zijlstra , John Stultz , Thomas Gleixner , Eric Dumazet , "Rafael J . Wysocki" , Arjan van de Ven , "Paul E . McKenney" , Frederic Weisbecker , Rik van Riel , Steven Rostedt , Sebastian Siewior , Giovanni Gherdovich , Lukasz Luba , "Gautham R . Shenoy" , Srinivas Pandruvada , K Prateek Nayak , Anna-Maria Behnsen Subject: [PATCH v10 01/20] timers: Restructure get_next_timer_interrupt() Date: Mon, 15 Jan 2024 15:37:24 +0100 Message-Id: <20240115143743.27827-2-anna-maria@linutronix.de> In-Reply-To: <20240115143743.27827-1-anna-maria@linutronix.de> References: <20240115143743.27827-1-anna-maria@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit get_next_timer_interrupt() contains two parts for the next timer interrupt calculation. Those two parts are separated by forwarding the base clock. But the second part does not depend on the forwarded base clock. Therefore restructure get_next_timer_interrupt() to keep things together which belong together. No functional change. Signed-off-by: Anna-Maria Behnsen --- kernel/time/timer.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kernel/time/timer.c b/kernel/time/timer.c index 352b161113cd..5f21db4fa3ca 100644 --- a/kernel/time/timer.c +++ b/kernel/time/timer.c @@ -1937,12 +1937,6 @@ u64 get_next_timer_interrupt(unsigned long basej, u64 basem) if (base->next_expiry_recalc) next_expiry_recalc(base); - /* - * We have a fresh next event. Check whether we can forward the - * base. - */ - __forward_timer_base(base, basej); - if (base->timers_pending) { nextevt = base->next_expiry; @@ -1960,6 +1954,12 @@ u64 get_next_timer_interrupt(unsigned long basej, u64 basem) base->next_expiry = nextevt; } + /* + * We have a fresh next event. Check whether we can forward the + * base. + */ + __forward_timer_base(base, basej); + /* * Base is idle if the next event is more than a tick away. * -- 2.39.2