Message ID | 20240225225508.11587-9-frederic@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-80335-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp1770539dyb; Sun, 25 Feb 2024 14:57:20 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUjpIljNZG4GR+eomFaU4vnF07yGbGkWBkeQiDiyeiXMAYy0dd33FZut1jzpwdJx8glaGayPVONLJzYMQxDiCMqQU0oZw== X-Google-Smtp-Source: AGHT+IEUE1r3fr3bKbvUpgr65qnFyVD5JVmMCZdvg3qhUpOjYF5caaFWYujhuDXo7HjqPsLvlwOe X-Received: by 2002:a05:6830:1557:b0:6e4:640d:797f with SMTP id l23-20020a056830155700b006e4640d797fmr5503984otp.35.1708901840228; Sun, 25 Feb 2024 14:57:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708901840; cv=pass; d=google.com; s=arc-20160816; b=HAu6QE4PvIQOLy1pTTLX8jeuAc/JpUpGGeCbKCTIn9Oo0wshXWN0jjOhb7a7tSNgpx jqXKksmCTChW9yWMQNWVQpu9jfLwtwucjrPiceMkfuQBjrBJPralk9klY7g7H6+UbRDq VT/I+20e6MadMstyzebyMcgr8pKheluWgN9EXOyrZSel9tLu6TVwXr2GyjYYI+YBsWH/ V2i5SV8vFqgkj4uop77yGla2+iNLwgPlJAYLfZ9BVBxPtPCvrdvSSeze1zXxVSQ9+qMT d/mh02KqN4sIa2C412ZH+p95NCDB2RHUqJEgkZTEwOLJL4H5mIkjCMuZS7oK3fUZp1Fj StUA== ARC-Message-Signature: i=2; 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:from:dkim-signature; bh=iQwhWWYAFaSrwDSx2oDuA41/x09GHcZ9wjNxXH7L1IU=; fh=9AYDxpIF3ws21qQDvjghHSFUuXpDdpq2Zh/SbnasVRo=; b=a1HLkoIKDYzIjoILBhz6ww3jIcGXMmEp6likyNTgMP40sEfTXVyaP57FUipF1SvKaq WK4RqAv8dIRsawDFBPWA3HnYcGGlsfsbC9BwFlEnd9M02luQQ7HxD1aABLweKXBzMTbI lCBkzvOza00LZQKAB299tAoJgVxydUaOIqV/jXA3jct/c88lwqlWNHIM7qe+c4F9nUBK DZdl+WPp6rlOqrUbVQnhXXxz5pc1arLXW6JcMVpuip+ht0pQ7OJS0MJdNYFaPdKT5Uqf jsIW3iT91VOAiHo9xAlEWTGzOZOgK0C9ib8Jxtw1vOLqhhS9Bt9p1uhCD4ZztYrtRdhj SkkA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="lFu+0/g8"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-80335-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80335-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id h22-20020a633856000000b005dc0b3095b3si2665998pgn.283.2024.02.25.14.57.19 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 14:57:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-80335-ouuuleilei=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=@kernel.org header.s=k20201202 header.b="lFu+0/g8"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-80335-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80335-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 EBEBAB20F29 for <ouuuleilei@gmail.com>; Sun, 25 Feb 2024 22:57:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0438F2576D; Sun, 25 Feb 2024 22:55:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lFu+0/g8" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 5B4C522337 for <linux-kernel@vger.kernel.org>; Sun, 25 Feb 2024 22:55:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708901731; cv=none; b=LCXtasIleyZCiPd/jEdE2iiV2RJKn335wI74zRWvgTKmuGZGxfbq7jZd442QRMuQuQdRDHiONtWC1ekt6myDMAqO2rgb1+eeGRNi+ux9w1hDuHTPAFjZ7DlupNxCQn1Ejy5MV3iQsbRd103jvD149A6XUKByvjSTreItIT8dMUM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708901731; c=relaxed/simple; bh=1t2Igcp3/2acM8Dgm/Zgl3S5NWNsliShc0fKBxG7fGM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hnA4CvcvmkTCskZGgoVvtFPFiblu2LgyeArXieIQHG2KeTj8ka4/1WvqzXJrnHSaSFwgtHjciEAHwk4nO63TrNyYSfjeRUElEG5q6WhE4LdX2OXEPT8/RT/UX6NPPNKxKHXccE0aN4n87mkaLOxEYYiF/hf7rYGq9VUs13ZoiwY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lFu+0/g8; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 835A4C43399; Sun, 25 Feb 2024 22:55:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708901731; bh=1t2Igcp3/2acM8Dgm/Zgl3S5NWNsliShc0fKBxG7fGM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lFu+0/g8aFgFX5z8neujR4W+AFrCcIfkYFBKFcQh607ouLhXix5pCMNLTGSFAm8L/ 2/CvF98St2mtPrEEJebheFT8xJl8ibt7MWlx40OCaOf8x3vh6Fgmb5ahis6kVsJiZ5 LeyeSdQVWUUNX9+bFfUezZGK7k8xB+9xXQQ2x+9w+rqq3THSTxKte9BzlJPxiZ8kgo C2Jw6ZSEugfUO8Q3+4TxSlgDy6cARbz8K8rFfjBt/2PBfajZzsUf2Hg3aX9dBZFLpw pQvdKOEpjKS/o/jgnDE4PxmvBXXj7d5tYBs3Wa6dVz2tgyLr8uoJNXDF+vYLOr81wF 4YyOxFiuFAdAw== From: Frederic Weisbecker <frederic@kernel.org> To: LKML <linux-kernel@vger.kernel.org> Cc: Frederic Weisbecker <frederic@kernel.org>, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@kernel.org>, Anna-Maria Behnsen <anna-maria@linutronix.de>, Peng Liu <liupeng17@lenovo.com>, Joel Fernandes <joel@joelfernandes.org> Subject: [PATCH 08/16] tick: Move tick cancellation up to CPUHP_AP_TICK_DYING Date: Sun, 25 Feb 2024 23:55:00 +0100 Message-ID: <20240225225508.11587-9-frederic@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240225225508.11587-1-frederic@kernel.org> References: <20240225225508.11587-1-frederic@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791913455674164919 X-GMAIL-MSGID: 1791913455674164919 |
Series |
timers/nohz cleanups and hotplug reorganization
|
|
Commit Message
Frederic Weisbecker
Feb. 25, 2024, 10:55 p.m. UTC
The tick hrtimer is cancelled right before hrtimers are migrated. This is done from the hrtimer subsystem even though it shouldn't know about its actual users. Move instead the tick hrtimer cancellation to the relevant CPU hotplug state that aims at centralizing high level tick shutdown operations so that the related flow is easy to follow. Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Frederic Weisbecker <frederic@kernel.org> --- kernel/time/hrtimer.c | 2 -- kernel/time/tick-common.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index 95f1f351dcd9..3e95474199ac 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -2229,8 +2229,6 @@ int hrtimers_cpu_dying(unsigned int dying_cpu) int i, ncpu = cpumask_any_and(cpu_active_mask, housekeeping_cpumask(HK_TYPE_TIMER)); struct hrtimer_cpu_base *old_base, *new_base; - tick_cancel_sched_timer(dying_cpu); - old_base = this_cpu_ptr(&hrtimer_bases); new_base = &per_cpu(hrtimer_bases, ncpu); diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c index a89ef450fda7..b4af8c743b73 100644 --- a/kernel/time/tick-common.c +++ b/kernel/time/tick-common.c @@ -410,6 +410,8 @@ int tick_cpu_dying(unsigned int dying_cpu) if (tick_do_timer_cpu == dying_cpu) tick_do_timer_cpu = cpumask_first(cpu_online_mask); + tick_cancel_sched_timer(dying_cpu); + return 0; }