Linux Perf Users
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ayubjon Qosimov" <ayubjon@amazon.de>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH] arm64: hw_breakpoint: Reset the debug registers on all CPUs at once
Date: Fri, 04 Dec 2026 18:44:11 +0000	[thread overview]
Message-ID: <sashiko-outbox-250450@kernel.org> (raw)
In-Reply-To: <20261204183014.79514-1-ayubjon@amazon.de>

> 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.
> 
> 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.
> 
> 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.
> 
> 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).
> 
> Signed-off-by: Ayubjon Qosimov <ayubjon@amazon.de>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261204183014.79514-1-ayubjon@amazon.de?part=1

      reply	other threads:[~2026-12-04 18:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 18:30 [PATCH] arm64: hw_breakpoint: Reset the debug registers on all CPUs at once Ayubjon Qosimov
2026-12-04 18:44 ` sashiko-bot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-250450@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=ayubjon@amazon.de \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox