From: sashiko-bot@kernel.org
To: "Nia Su" <nia.su@sifive.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v2] perf evlist: Don't restrict uncore events to PMU CPUs
Date: Thu, 10 Sep 2026 02:40:30 +0000 [thread overview]
Message-ID: <20260910024030.B7C331F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260909-perf-evlist-uncore-cpu-b4-v2-1-dc673a1f4592@sifive.com>
> The PMU CPU map has different semantics for core and uncore PMUs.
>
> For core PMUs, pmu_cpus contains the CPUs on which the event can be
> opened. Intersect the user-requested CPU map with the PMU CPU map to
> reject CPUs unsupported by the PMU.
>
> For uncore PMUs, pmu_cpus is read from the PMU's cpumask sysfs attribute,
> which lists the default CPU to open the event on per socket/die, not the
> set of CPUs it can only be opened on. The user-requested CPU may override
> these defaults, and the driver can redirect the event to the appropriate
> control CPU.
>
> Currently, __perf_evlist__propagate_maps() intersects the user-requested
> CPU map with pmu_cpus for all PMUs. If the user-requested CPU is not in
> pmu_cpus, the intersection becomes empty and the evsel is removed before
> perf_event_open() is called.
>
> Add evsel->is_pmu_uncore, set once from pmu->is_uncore at parse time,
> to skip the intersection for uncore PMUs. Core PMUs, and other
> non-core PMUs such as software events, breakpoints, or tracepoints,
> continue to be restricted to their PMU CPU map.
>
> Fixes: 811082e4b668 ("perf parse-events: Support user CPUs mixed with threads/processes")
>
> Assisted-by: Claude Sonnet 5
> Signed-off-by: Nia Su <nia.su@sifive.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260909-perf-evlist-uncore-cpu-b4-v2-1-dc673a1f4592@sifive.com?part=1
prev parent reply other threads:[~2026-09-10 2:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 2:31 [PATCH v2] perf evlist: Don't restrict uncore events to PMU CPUs Nia Su
2026-09-10 2:40 ` 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=20260910024030.B7C331F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=nia.su@sifive.com \
--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;
as well as URLs for NNTP newsgroup(s).