From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796409852; b=l4LLzbSYlW+en4iTZvHrQ9s71RfnXrZCAHU3CPOUUoqWIcPeKgUwxxxdy1BaRrAX/Yw/ Oq6WX+HMdr9D9ntYE8hs8jnLx5bhaFS19dmIlXwZDkmkZbWpSTyYYy14WTghq3NNokM4k 0FfaWsF/QbXy2NHlUXSHCvWFbVY5d3mcK52Szi0aengZOV6/k6Vdu+rdDOnSBOETUdQln VrlpmPzG1yx3PUrilvz1ZhGBTqXa4iJEs8XdzEOk6trG3cGKkfK5kbV9oKP18zLvIVWXI q/iDGIHhYyDoCPcRc9nLVk209iGqErEByzDehkY4pLlmjSJJ5DMlUsxkU5eDLLeutuw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796409852; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=Cfm9n51gNAnRwyuztvwPbLX/SzdY+9AAPBkaPE+T1BQ=; b=1Lls/85PfTsLyosw7sbEIk39Iuv3A4SQ6fAs+WtZXZB7MG8uVFFDu5Fp91hZtXU+KLya lxqvlDv57VkfXTraXG2xWC6bfIl+HUF2MkPruaReMPDaQMfcmXhoyg39iTwS1UmlVCQao XTUmSs3Z2S4sl0hSH2RUq6lUxv5jKSAoqTxTcAOOAqOpBij42z6jnQpRWsaGis5Bx2XVK KzRoUGQsQxxmt2zqzBlENuUZ4Z+tjkxigkDv6Gcm/nh3yy+UloUVskkXx4yIH4oNU0Tyl /GcMmogb80Oc3zmqqVncFe7B6/y9cUAgSppyI0yA7pZTiyfdOh8al9n3YM0t2BZrOyA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=g6qiEWZs; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5FF0C606A32F for ; Fri, 4 Dec 2026 18:44:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=g6qiEWZs Received: by smtp.kernel.org (Postfix) with ESMTPSA id D8D9F1F00A06; Fri, 4 Dec 2026 18:44:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796409852; bh=Cfm9n51gNAnRwyuztvwPbLX/SzdY+9AAPBkaPE+T1BQ=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=g6qiEWZsC7UDrxFPCyzFgF3W4hvMorDy4pKS8YSMUA9AxH6w/G0gZhgknLw02t4iD h3Ex4wei3a5EI0YxjbAGfOVgKM13KS/4gjv+9yibOiEjH6+7aI3ZFL5yaDqiD7j3Nx 3PpCG69gp6tlNBYmw+eQFFwcaCPMPxygm+3XsvnzGvI09znM/hx3XJz1nmZMXqMv/r yytdM4DT1D5CxLSY7fDvnm6cJqzQy7uuSorI2/FOM/3H5Y3zoJfCDR+MjrT5/8CzNm 2QtLxl75k1NVsuaA7uxIWDNrO5dAcX7loLou8aFC85Ll7qxILe3np3PK8zsueTV/SQ bNSCg3ojLb7Ng== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH] arm64: hw_breakpoint: Reset the debug registers on all CPUs at once Reply-To: sashiko-reviews@lists.linux.dev To: "Ayubjon Qosimov" Cc: linux-perf-users@vger.kernel.org In-Reply-To: <20261204183014.79514-1-ayubjon@amazon.de> References: <20261204183014.79514-1-ayubjon@amazon.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 18:44:11 +0000 X-Mailing-List: linux-perf-users@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list > arch_hw_breakpoint_init() runs after SMP bringup, so cpuhp_setup_state() > invokes hw_breakpoint_reset() on each online CPU in turn: it kicks that > CPU's hotplug thread and waits for it to finish before moving on to the > next one. The time grows linearly with the number of CPUs, and most of > it is spent where accesses to the debug registers trap to a hypervisor: > in a 96-vCPU KVM guest the initcall takes about 1.0 ms, around 10 us > per CPU. >=20 > This is on the boot path of a kernel started by kexec with Kexec > HandOver for a live update (Documentation/core-api/liveupdate.rst), > where the preserved workloads stay paused until the new kernel is up. >=20 > Reset the online CPUs with a single on_each_cpu() call instead, so that > they all run the reset at the same time, with interrupts disabled as in > the STARTING callback, and register the callback for CPUs that come up > later with cpuhp_setup_state_nocalls_cpuslocked(). With the hotplug > lock held across both, no CPU can come up in between and every online > CPU is past the STARTING states, so the same CPUs are reset as before. >=20 > In the 96-vCPU KVM guest on a Graviton4 host, arch_hw_breakpoint_init() > goes from about 1.0 ms to 0.085 ms (13 boots each). >=20 > Signed-off-by: Ayubjon Qosimov Sashiko has reviewed this patch and found no issues. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204183014.7951= 4-1-ayubjon@amazon.de?part=3D1