From: Marc Zyngier <maz@kernel.org>
To: Amir Noohi <amirmnoohi@gmail.com>
Cc: Thomas Gleixner <tglx@kernel.org>,
Oliver Upton <oupton@kernel.org>, Radu Rendec <radu@rendec.net>,
Igor Velkov <iav@iav.lv>, Fuad Tabba <fuad.tabba@linux.dev>,
Joey Gouly <joey.gouly@arm.com>,
Steffen Eiden <seiden@linux.ibm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Zenghui Yu <yuzenghui@huawei.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/2] genirq, KVM: arm64: Avoid the irq descriptor lock on vCPU load
Date: Sat, 24 Oct 2026 12:52:44 +0100 [thread overview]
Message-ID: <87tsmb8gdv.wl-maz@kernel.org> (raw)
In-Reply-To: <20261024022450.629980-1-amirmnoohi@gmail.com>
On Sat, 24 Oct 2026 03:24:48 +0100,
Amir Noohi <amirmnoohi@gmail.com> wrote:
>
> KVM/arm64 vCPUs slow each other down even when every vCPU has a physical
> CPU to itself. On a 32 CPU Ampere Altra (GICv3, VHE) running mainline,
> with an in-kernel GICv3 and each vCPU thread pinned to its own otherwise
> idle CPU, a vCPU which exits to userspace in a loop manages 320k exits/s
> on its own, 120k when 16 vCPUs do the same and 59k with 31. The aggregate
> rate stops growing at 8 vCPUs. No two vCPUs share a CPU and nothing is
> over-subscribed.
>
> The cause is the interrupt descriptor lock of the host timer interrupts.
> Every vCPU load sets their active state with irq_set_irqchip_state()
> (twice on VHE: virtual and physical timer). The timer interrupts are per
> CPU interrupts, so all CPUs share one descriptor and its lock, while the
> state being written is per CPU (a redistributor register on GICv3, a
> system register on GICv5). The lock serializes nothing but CPUs updating
> their own state. At 8 vCPUs, 99.9% of all lock contention events during
> the test have __irq_get_desc_lock() or irq_set_irqchip_state() on the
> stack.
Looking at the test case, this really isn't a representative or
realistic workload. This is a contrived setup that has trapping to
userspace as its only purpose.
I'm not saying that this is useless observation. But it is not
something that represents something exacerbated by "real" VMs.
I'll look at the patches shortly.
Thanks,
M.
--
Jazz isn't dead. It just smells funny.
prev parent reply other threads:[~2026-10-24 11:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-24 2:24 Amir Noohi
2026-10-24 2:24 ` [PATCH 1/2] genirq/manage: Provide irq_set_percpu_irqchip_state() Amir Noohi
2026-10-24 12:21 ` Marc Zyngier
2026-10-24 2:24 ` [PATCH 2/2] KVM: arm64: timer: Avoid the irq descriptor lock on vCPU load Amir Noohi
2026-10-24 11:52 ` Marc Zyngier [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=87tsmb8gdv.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=amirmnoohi@gmail.com \
--cc=catalin.marinas@arm.com \
--cc=fuad.tabba@linux.dev \
--cc=iav@iav.lv \
--cc=joey.gouly@arm.com \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=oupton@kernel.org \
--cc=radu@rendec.net \
--cc=seiden@linux.ibm.com \
--cc=suzuki.poulose@arm.com \
--cc=tglx@kernel.org \
--cc=will@kernel.org \
--cc=yuzenghui@huawei.com \
/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
all inboxes | Powered by JetHome®