All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Sebastian Brzezinka" <sebastian.brzezinka@intel.com>
To: Tvrtko Ursulin <tursulin@ursulin.net>,
	Sebastian Brzezinka <sebastian.brzezinka@intel.com>,
	<igt-dev@lists.freedesktop.org>
Cc: <kamil.konieczny@linux.intel.com>, <krzysztof.karas@intel.com>,
	<krzysztof.niemiec@intel.com>
Subject: Re: [PATCH i-g-t 4/8] tools/gputop/i915_gputop: add i915 PMU engine monitoring
Date: Mon, 16 Nov 2026 15:08:41 +0100	[thread overview]
Message-ID: <DMWP0I645887.2Q76X4BMEX4VP@intel.com> (raw)
In-Reply-To: <e78e82ea-3cc3-4b22-b5e0-f7c57abfbc0d@ursulin.net>

Hi,

On Fri Oct 2, 2026 at 10:59 AM CEST, Tvrtko Ursulin wrote:
>
> On 25/09/2026 11:57, Sebastian Brzezinka wrote:
>> Add an i915 backend for gputop's PMU-based engine monitoring,
>> implementing the device_operations interface from utils.h.
>> 
>> i915_populate_engines() opens the render node (no DRM master needed),
>> scans /sys/bus/event_source/devices/<dev>/events/ for "*-busy" entries,
>> and decodes engine class/instance from the PMU config value.
>> 
>> i915_pmu_init() opens a perf event group via igt_perf_open_group()
>> (requires CAP_PERFMON or root) and cleans up FDs on partial failure.
>> 
>> i915_pmu_sample() reads all counters atomically from the group leader
>> fd into a heap-allocated buffer, and tracks read success explicitly
>> so a failed/short read leaves counters and timestamps unchanged
>> instead of using garbage.
>
> Looks like a bunch of code from intel_gpu_top so instead of duplicating 
> (be it code or functionality), and since you are making an abstraction 
> anyway, it would be much better to make it a library both gputop and 
> intel_gpu_top would use.
>
> Same as I added a library for fdinfo access when adding per client 
> support to intel_gpu_top and bringing up gputop as a vendor agnostic 
> demonstration tool. That would seem like a logical route to take and 
> much better for maintenance to have one copy.
>
> Down the road, once feature parity is achived, intel_gpu_top can become 
> a symlink to gputop.
>
> Regards,
>
> Tvrtko
>
Quick update: I haven't forgotten your review. I got pulled into the
Sashiko review rabbit hole, and it's taking a bit more time since it's
not high priority.

-- 
Best regards,
Sebastian


  reply	other threads:[~2026-11-16 14:12 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-25 10:57 [PATCH i-g-t 0/8] tools/gputop: add i915 PMU engine monitoring Sebastian Brzezinka
2026-09-25 10:57 ` [PATCH i-g-t 1/8] tools/gputop/xe_gputop: fix struct layout and PMU read Sebastian Brzezinka
2026-09-28  8:49   ` Krzysztof Karas
2026-09-30 12:30     ` Sebastian Brzezinka
2026-09-25 10:57 ` [PATCH i-g-t 2/8] tools/gputop/xe_gputop: fix CLAMP() usage Sebastian Brzezinka
2026-09-28  8:50   ` Krzysztof Karas
2026-09-29 10:14   ` Kamil Konieczny
2026-09-25 10:57 ` [PATCH i-g-t 3/8] tools/gputop/xe_gputop: fix return logic, cleanup and div by zero bugs Sebastian Brzezinka
2026-09-28  9:12   ` Krzysztof Karas
2026-09-25 10:57 ` [PATCH i-g-t 4/8] tools/gputop/i915_gputop: add i915 PMU engine monitoring Sebastian Brzezinka
2026-09-28 11:01   ` Krzysztof Karas
2026-09-30 11:06     ` Sebastian Brzezinka
2026-09-30 14:39       ` Kamil Konieczny
2026-10-02  2:29         ` vitaly prosyak
2026-10-02  8:59   ` Tvrtko Ursulin
2026-11-16 14:08     ` Sebastian Brzezinka [this message]
2026-09-25 10:57 ` [PATCH i-g-t 5/8] tools/meson: build gputop PMU backends as part of gputop Sebastian Brzezinka
2026-09-29  5:58   ` Krzysztof Karas
2026-09-25 10:57 ` [PATCH i-g-t 6/8] tools/gputop/utils: guard ANSI macros against redefinition Sebastian Brzezinka
2026-09-29  5:58   ` Krzysztof Karas
2026-09-25 10:57 ` [PATCH i-g-t 7/8] tools/gputop: integrate i915 and xe PMU engine monitoring Sebastian Brzezinka
2026-09-29  8:49   ` Krzysztof Karas
2026-09-29  9:16     ` Jani Nikula
2026-09-25 10:57 ` [PATCH i-g-t 8/8] tests/tools_test: add gputop PMU engine monitoring subtests Sebastian Brzezinka
2026-09-29  9:39   ` Krzysztof Karas
2026-09-25 12:48 ` ✓ i915.CI.BAT: success for tools/gputop: add i915 PMU engine monitoring Patchwork
2026-09-25 13:02 ` ✓ Xe.CI.BAT: " Patchwork
2026-09-25 20:21 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-09-26  5:44 ` ✗ i915.CI.Full: " Patchwork
2026-09-28 20:59 ` ✗ Xe.CI.BAT: failure for tools/gputop: add i915 PMU engine monitoring (rev2) Patchwork
2026-09-28 21:05 ` ✓ i915.CI.BAT: success " Patchwork
2026-09-29  2:59 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-09-29  5:06 ` ✓ i915.CI.Full: success " Patchwork

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=DMWP0I645887.2Q76X4BMEX4VP@intel.com \
    --to=sebastian.brzezinka@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=krzysztof.karas@intel.com \
    --cc=krzysztof.niemiec@intel.com \
    --cc=tursulin@ursulin.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.