From: Rob Clark <rob.clark@oss.qualcomm.com>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Cc: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org,
freedreno@lists.freedesktop.org,
Akhil P Oommen <akhilpo@oss.qualcomm.com>,
Dmitry Baryshkov <lumag@kernel.org>,
Abhinav Kumar <abhinav.kumar@linux.dev>,
Jessica Zhang <jesszhan0024@gmail.com>,
Sean Paul <sean@poorly.run>,
Marijn Suijten <marijn.suijten@somainline.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Konrad Dybcio <konradybcio@kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 01/13] drm/msm: Remove obsolete perf infrastructure
Date: Wed, 22 Apr 2026 07:41:20 -0700 [thread overview]
Message-ID: <CACSVV01rHMY5NwaZ+e-3GRPNnuVCkYjJJRUzGYvXPi7JzrOgSw@mail.gmail.com> (raw)
In-Reply-To: <cczwmaecg7h5lpuw7mi6n6k2zu3lqisrkqybavxe4h6wlrofkg@qcmf7eq3siaz>
On Tue, Apr 21, 2026 at 5:41 PM Dmitry Baryshkov
<dmitry.baryshkov@oss.qualcomm.com> wrote:
>
> On Tue, Apr 21, 2026 at 01:48:40PM -0700, Rob Clark wrote:
> > On Tue, Apr 21, 2026 at 8:39 AM Dmitry Baryshkov
> > <dmitry.baryshkov@oss.qualcomm.com> wrote:
> > >
> > > On Tue, Apr 21, 2026 at 06:07:20AM -0700, Rob Clark wrote:
> > > > On Mon, Apr 20, 2026 at 4:49 PM Dmitry Baryshkov
> > > > <dmitry.baryshkov@oss.qualcomm.com> wrote:
> > > > >
> > > > > On Mon, Apr 20, 2026 at 03:25:23PM -0700, Rob Clark wrote:
> > > > > > Outside of a3xx, this was never really used. And it low-key gets in the
> > > > > > way of the new perfcntr support (or at least it is confusing to have two
> > > > > > things called "perf"). So lets remove it.
> > > > > >
> > > > > > This drops the "perf" debugfs file. But these days, nvtop is a better
> > > > > > option. (Plus perfetto for newer gens.)
> > > > >
> > > > > Would it be possible to resurrect "perf" later? It was really useful.
> > > >
> > > > Nothing is impossible.. but I was having trouble naming things with
> > > > both old and new perf stuff in parallel.
> > >
> > > That why I wrote about resurrecting it later, once the new stuff is in.
> > >
> > > BTW: do you plan to get perf counters for a3xx-a5xx back? I remember
> > > that there was some issue with a2xx ABI.
> >
> > So current state on userspace side is that only a3xx/a4xx are missing
> > perfcntr support.. although it looks like we know the countable
> > enums, so probably not hard[*]
> >
> > In all cases, the existing userspace-only support will continue to
> > work. The main reasons I omitted a2xx/a5xx on the kernel side are:
> >
> > a) Not really sure how to do the Makefile bits.. since they wouldn't
> > be using a6xx.xml. In meson I can use a table (2d-array):
> > https://gitlab.freedesktop.org/robclark/mesa/-/blob/fd/generate-perfcntrs/src/freedreno/registers/adreno/meson.build?ref_type=heads#L20
>
> I saw the comment in the commit. I'll take a quick look.
>
> > b) No good setup to test
>
> We probably need to figure this out...
More devices in CI would help, but I'm not really even sure of a great
way to automate testing of perfcntrs outside of some simple sanity
tests (like is the ALWAYS_COUNT based freq measurement something less
than fmax).
The best option I see is to just leave what works, and not introduce
features on older gens that may actually not work. If there were
infinite hours in the day, sure there is a lot we could do. But we
are still trying to close feature/perf/enablement gap with current and
recent hw. I don't see how to continue to close that gap while also
bringing every new feature support to older hw that upstream supports
but android/downstream blob/kgsl has long dropped support for.
I'll accept patches, ofc, if someone is sufficiently motivated to
enable and test on older gens. But otherwise, to close the gap we
need to run to where the ball is going, not where it was 10yrs ago.
> > c) They don't have IFPC
> >
> > They could ofc be added later. The main urgency is a8xx, since I
> > don't want to add mesa perfcntr support without PERFCNTR_CONFIG (so
> > that we don't have an older-userspace, new-kernel permutation on
> > a8xx+).
>
> Sure.
>
> >
> > I don't remember about a2xx ABI issue.. but a2xx perfcntr stuff was
> > added after I was already busy with later gens.
>
> I might be completely mistaken, but I think the issue was that the
> kernel didn't reserve one of the counters for its own usage.
hmm, ok.. json has a "reserved" property for reserving counter(s) for
kernel usage. We do use this on later gens. Although it looks like
on a2xx there is only a single CP counter (which I'm guessing is the
one the kernel needs)
> >
> > BR,
> > -R
> >
> > [*] there are some counter groups that had some slightly different
> > config programming, like separate clear/enable regs.. which I haven't
> > dealt with yet. For a6xx+ this only matters for some counter groups
> > (VBIF/GBIF, maybe GMU?) that userspace doesn't care as much about.
> > Idk if that was true for the earlier gens. Eventually I'll add a6xx+
> > support for these counters, but there are a few other things to deal
> > with first.
> >
> > > > Is it really adding value
> > > > over nvtop?
>
> And I skipped this question. Yes, there is a value, when developing /
> performing early testing. Running tail is much easier than having an
> extra tool in the initramfs (we don't have nvtop recipe in the OE, maybe
> that should be changed).
could you monitor freq from devfreq or some clk related debugfs?
And yeah, getting nvtop in OE sounds like a good idea.
BR,
-R
> --
> With best wishes
> Dmitry
next prev parent reply other threads:[~2026-04-22 14:41 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-20 22:25 [PATCH 00/13] drm/msm: Add PERFCNTR_CONFIG ioctl Rob Clark
2026-04-20 22:25 ` [PATCH 01/13] drm/msm: Remove obsolete perf infrastructure Rob Clark
2026-04-20 23:49 ` Dmitry Baryshkov
2026-04-21 13:07 ` Rob Clark
2026-04-21 15:39 ` Dmitry Baryshkov
2026-04-21 20:48 ` Rob Clark
2026-04-22 0:41 ` Dmitry Baryshkov
2026-04-22 14:41 ` Rob Clark [this message]
2026-04-22 23:13 ` Claude review: " Claude Code Review Bot
2026-04-20 22:25 ` [PATCH 02/13] drm/msm/adreno: Sync registers from mesa Rob Clark
2026-04-20 23:50 ` Dmitry Baryshkov
2026-04-22 23:13 ` Claude review: " Claude Code Review Bot
2026-04-20 22:25 ` [PATCH 03/13] drm/msm/registers: Sync gen_header.py " Rob Clark
2026-04-22 3:39 ` Dmitry Baryshkov
2026-04-22 13:36 ` Rob Clark
2026-04-22 23:13 ` Claude review: " Claude Code Review Bot
2026-04-20 22:25 ` [PATCH 04/13] drm/msm/registers: Add perfcntr json Rob Clark
2026-04-22 3:34 ` Dmitry Baryshkov
2026-04-22 23:13 ` Claude review: " Claude Code Review Bot
2026-04-20 22:25 ` [PATCH 05/13] drm/msm: Allow CAP_PERFMON for setting SYSPROF Rob Clark
2026-04-21 1:55 ` Dmitry Baryshkov
2026-04-22 23:13 ` Claude review: " Claude Code Review Bot
2026-04-20 22:25 ` [PATCH 06/13] drm/msm: Add a6xx+ perfcntr tables Rob Clark
2026-04-22 23:13 ` Claude review: " Claude Code Review Bot
2026-04-20 22:25 ` [PATCH 07/13] drm/msm: Add sysprof accessors Rob Clark
2026-04-22 23:13 ` Claude review: " Claude Code Review Bot
2026-04-20 22:25 ` [PATCH 08/13] drm/msm/a6xx: Add yield & flush helper Rob Clark
2026-04-22 23:13 ` Claude review: " Claude Code Review Bot
2026-04-20 22:25 ` [PATCH 09/13] drm/msm: Add per-context perfcntr state Rob Clark
2026-04-22 3:37 ` Dmitry Baryshkov
2026-04-22 14:13 ` Rob Clark
2026-04-22 23:13 ` Claude review: " Claude Code Review Bot
2026-04-20 22:25 ` [PATCH 10/13] drm/msm: Add basic perfcntr infrastructure Rob Clark
2026-04-22 23:13 ` Claude review: " Claude Code Review Bot
2026-04-20 22:25 ` [PATCH 11/13] drm/msm/a6xx+: Add support to configure perfcntrs Rob Clark
2026-04-22 23:13 ` Claude review: " Claude Code Review Bot
2026-04-20 22:25 ` [PATCH 12/13] drm/msm/a8xx: Add perfcntr flush sequence Rob Clark
2026-04-22 23:13 ` Claude review: " Claude Code Review Bot
2026-04-20 22:25 ` [PATCH 13/13] drm/msm: Add PERFCNTR_CONFIG ioctl Rob Clark
2026-04-22 3:41 ` Dmitry Baryshkov
2026-04-22 14:20 ` Rob Clark
2026-04-22 17:48 ` Dmitry Baryshkov
2026-04-22 23:13 ` Claude review: " Claude Code Review Bot
2026-04-22 1:54 ` [PATCH 00/13] " Dmitry Baryshkov
2026-04-22 17:29 ` Rob Clark
2026-04-22 23:13 ` Claude review: " Claude Code Review Bot
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=CACSVV01rHMY5NwaZ+e-3GRPNnuVCkYjJJRUzGYvXPi7JzrOgSw@mail.gmail.com \
--to=rob.clark@oss.qualcomm.com \
--cc=abhinav.kumar@linux.dev \
--cc=airlied@gmail.com \
--cc=akhilpo@oss.qualcomm.com \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jesszhan0024@gmail.com \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
/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