From patchwork Mon Feb 26 22:24:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 206959 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2366041dyb; Mon, 26 Feb 2024 14:26:44 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVF9hP5501YpLc5YgbS2q2Kyo/elHjYn5iBhRaqDrYl8RvClFJcnxbM3UbuQo7Q8vOojaJC6JzDFkr9aTsHmhSjTxHlzg== X-Google-Smtp-Source: AGHT+IGU3YvORZcSVZ329eN3n3RRKTF4fMRUIpBY18p+0DnFawT3EWw/ebyGq7oqhuGZidacVTjR X-Received: by 2002:a05:620a:56d:b0:787:bba4:8523 with SMTP id p13-20020a05620a056d00b00787bba48523mr437348qkp.58.1708986404538; Mon, 26 Feb 2024 14:26:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708986404; cv=pass; d=google.com; s=arc-20160816; b=p6YaOMvknNTONv4k1E3qXQn7E2URiAxtZPUKkhQ70KQvs6C6iAAr6QuaWhsiaqrgXo Cefi+7zhCgnzPna8xKUGJDTbhFbeiFDSJpSSwrNCCYQoGqfeJmVe5399RC1MQDpdeOU3 CHT2GyOfl6oMWFGNrTc7oZg4w9Urbrl7qO8wJnFBruGX3EWAPJdh8VOLUPUpzyWmw4vE D0OZmvrEZcVAC/KJ7b4rV+CdIQash0aOMIpd+Wrd5X2Fl+fvEUUL6PKHERjc/x5XDIN9 VQ8qER4003ngoBn+337E9MiPuI/OvEQgzVzm48rtiL16+OBH79HgKQ7NGenf5LLLVthM qGHg== 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=ji6WYWcZaLndFA++YglzMqPjmvUsGA2azQ2LS4flAvo=; fh=9Ax9dUTktkw7GUAcxhp/hScrn1H6VeDItxi6qdujZxg=; b=oNLejy8B0m3VDhlsbP455e1DGAyfP1RsQfiNsoyaypt/s8kAYHWWeajTFRIpJAQFIT N6jCdmkcXQX1cWf+t7lOjOg/SjoZb/tfX2vkb5lJD5HWXiFsNlNkeDh4pblJX3mXCN0X uAaOqZQFUP5sfvVBpKBJ78l8octuYe6ORnn2FtU1SoLw0UGfcgclO5NZC457j5o2btic zElw/v6YrGCVESaxqWsPoTBsrnWtIZGQpo7jRXsB84KI9ROkaxEkWv671ovmK+fpSqv8 1HiEnuVVHASJRtbgSqBMxfAgIM/U56EzyhDWSfgPZrZQQFyw5FObg99FChNtZEW+mdPj ZKXA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=zHcapkex; 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-82394-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82394-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id x25-20020a05620a099900b00787d787d0c7si1995662qkx.146.2024.02.26.14.26.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 14:26:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82394-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=zHcapkex; 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-82394-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82394-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id BBC281C22E79 for ; Mon, 26 Feb 2024 22:26:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E0357135411; Mon, 26 Feb 2024 22:24:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="zHcapkex"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="KsneVIhc" 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 5E9BC13398F; Mon, 26 Feb 2024 22:24:37 +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=1708986278; cv=none; b=oVD5oc57TrA8vqN1nxYtFlKx49dYnTm0U565leSibneGjD5gsQjS27pRfYCEulxIMZucVKBsrL2CrgIhxN4IpGkx1FKrfIlzZ0ipxsWkMOATsiVPj5ogVEBtzmD3DGGiBR1kZMfXQlM+5FbCcuWMGKRGLl83J1UtFGch1HIJ06k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708986278; c=relaxed/simple; bh=g/P8P0X+m6WFPSRX7M3TBbD2a36axlBRjg9JkTO/dzg=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=LbPz4EDMbFgYJFJKCv+zhMGYjxGC7uHE2QOovFXGH7qUlTpC4oCJX6iuO8NfriF0uFuLI+0E4fQoeOAdf+s1nbgxu5FSH0WHzBV7SWoEC1yIMMkS38aN4yL4JbBJJl+C9ZXeFi1GxCaZvBL7YriTorh1Yxn9E1FeceytpJWttmM= 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=zHcapkex; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=KsneVIhc; 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: Mon, 26 Feb 2024 22:24:34 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708986275; 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=ji6WYWcZaLndFA++YglzMqPjmvUsGA2azQ2LS4flAvo=; b=zHcapkexf+mzMPspkGzPvALaddWY0ItCnKrAK93ZvKihFsjqGxGjzo5ph+pT7xAdhKo4E3 cPKctWuVQhljsgNEyBgMWqXPC7+idZ45/aKc+4u0d6D9Nrr3RY7gmIYBUKRBGKY3Ik55hN AQxYmc0XpomzZzRwDXPF1/+EqUJ3yTnBCKSEfLsagCLBG8LYM7sIJpVhN5BqV3RyOXemZr eVgddStFbV4muYp6FVTXNdWKAOZss/K1czJCf9eGA7Y0wdFHanXAcgvKb4wa+5zJq3WEae DFV65VngKfJIDTt+oAUhp8lF4FthyywxsZUzl/81VVKOxAxEaAi9IWFVDer9pg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708986275; 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=ji6WYWcZaLndFA++YglzMqPjmvUsGA2azQ2LS4flAvo=; b=KsneVIhcJLYQ033tPYd0v8y5IftbDhazeB9I3upX3PBbPIps1ZOKNL+scRkMjA69ADbFDj UjRtI8CKqLeb+4BQ== From: "tip-bot2 for Frederic Weisbecker" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] tick: Move tick cancellation up to CPUHP_AP_TICK_DYING Cc: Frederic Weisbecker , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240225225508.11587-9-frederic@kernel.org> References: <20240225225508.11587-9-frederic@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <170898627487.398.4565777561745395590.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791913455674164919 X-GMAIL-MSGID: 1792002128432421135 The following commit has been merged into the timers/core branch of tip: Commit-ID: f04e51220ad5cf35540f67f3ca15c8617c1f0bef Gitweb: https://git.kernel.org/tip/f04e51220ad5cf35540f67f3ca15c8617c1f0bef Author: Frederic Weisbecker AuthorDate: Sun, 25 Feb 2024 23:55:00 +01:00 Committer: Thomas Gleixner CommitterDate: Mon, 26 Feb 2024 11:37:31 +01:00 tick: Move tick cancellation up to CPUHP_AP_TICK_DYING 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. Signed-off-by: Frederic Weisbecker Signed-off-by: Thomas Gleixner Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240225225508.11587-9-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 95f1f35..3e95474 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 a89ef45..b4af8c7 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; }