[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <gsntpl7a694p.fsf@coltonlewis-kvm.c.googlers.com>
Date: Thu, 15 Jan 2026 18:09:10 +0000
From: Colton Lewis <coltonlewis@...gle.com>
To: Will Deacon <will@...nel.org>
Cc: oupton@...nel.org, kvm@...r.kernel.org, pbonzini@...hat.com,
corbet@....net, linux@...linux.org.uk, catalin.marinas@....com,
maz@...nel.org, oliver.upton@...ux.dev, mizhang@...gle.com,
joey.gouly@....com, suzuki.poulose@....com, yuzenghui@...wei.com,
mark.rutland@....com, shuah@...nel.org, gankulkarni@...amperecomputing.com,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, kvmarm@...ts.linux.dev,
linux-perf-users@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH v5 00/24] ARM64 PMU Partitioning
Will Deacon <will@...nel.org> writes:
> On Tue, Dec 09, 2025 at 03:00:59PM -0800, Oliver Upton wrote:
>> On Tue, Dec 09, 2025 at 08:50:57PM +0000, Colton Lewis wrote:
>> > This series creates a new PMU scheme on ARM, a partitioned PMU that
>> > allows reserving a subset of counters for more direct guest access,
>> > significantly reducing overhead. More details, including performance
>> > benchmarks, can be read in the v1 cover letter linked below.
>> >
>> > An overview of what this series accomplishes was presented at KVM
>> > Forum 2025. Slides [1] and video [2] are linked below.
>> >
>> > The long duration between v4 and v5 is due to time spent on this
>> > project being monopolized preparing this feature for internal
>> > production. As a result, there are too many improvements to fully list
>> > here, but I will cover the notable ones.
>> Thanks for reposting. I think there's still quite a bit of ground to
>> cover on the KVM side of this, but I would definitely appreciate it if
>> someone with more context on the perf side of things could chime in.
>> Will, IIRC you had some thoughts around counter allocation, right?
> Right, I was hoping that the host counter reservation could be more
> dynamic than a cmdline option. Perf already has support for pinning
> events to a CPU, so the concept of some counters being unavailable
> shouldn't be too much for the driver to handle. You might just need to
> create some fake pinned events so that perf code understands what is
> happening.
Thanks Will. I have a few followup questions:
1. Are you suggesting this be done whenever we enter a guest so the host
always has access to the full range in host context? That would be the
most dynamic.
2. How should we handle the possibility a real event already occupies a
counter wanted by the guest? Is there a good way to create our fake
pinned events then force a reschedule so perf moves the real events out
of the way?
3. Is there an existing fake event type that tells perf not to touch
hardware?
4. Can you point to any example code that already does something like
this?
Powered by blists - more mailing lists