From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: igt-dev@lists.freedesktop.org, Intel-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Subject: [PATCH i-g-t 0/8] Vendor agnostic gputop
Date: Fri, 11 Nov 2022 15:58:36 +0000 [thread overview]
Message-ID: <20221111155844.3290531-1-tvrtko.ursulin@linux.intel.com> (raw)
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
This is a pile of patches which implements a rudimentary vendor agnostic gputop
tool based of the new DRM spec as documented in
Documentation/gpu/drm-usage-stats.rst.
First part of the series is code refactoring which should be reasonably stable.
I've tested it all while working on it both against intel_gpu_top and gputop.
Last patch is the actual tool itself. It works but it is rather rudimentary
which is hopefully good enough for a start.
Fundamental difference between intel_gpu_top and gputop is that the former is
centered around a single card and only shows processes belonging to it. Gputop
on the other hand has an idea to show all processes with DRM file descriptors
open and sort them into groups per card. It also makes no effort to provide
sorting modes, well any interactivity, or any pretty names for GPUs or engines.
It looks like this:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DRM minor 0
PID NAME render copy video
3816 kwin_x11 |███▎ || || || |
3523 Xorg |▊ || || || |
1120449 mpv | || ||▋ || |
1120529 glxgears |▋ || || || |
1120449 mpv |▍ || || || |
3860 plasmashell |▏ || || || |
4764 krunner | || || || |
575206 chrome | || || || |
833481 firefox | || || || |
892924 thunderbird | || || || |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I did test it as well with two cards and confirmed that too works.
Rob Clark also tested it with a patch which exports the respective data from the
msm driver and confirmed it works fine. Christian König tested it with in
progress patches for amdgpu and that worked as well.
v2:
* Fixed SPDX headers and added a bunch of code comments/docs throughout.
Tvrtko Ursulin (8):
lib: Extract igt_drm_clients from intel_gpu_top
libdrmfdinfo: Allow specifying custom engine map
libdrmclients: Record client drm minor
libdrmclient: Support multiple DRM cards
libdrmfdinfo: Track largest engine index
libdrmclient/intel_gpu_top: Decouple hardcoded engine assumptions
libdrmclient: Enforce client status sort order in the library
gputop: Basic vendor agnostic GPU top tool
lib/igt_drm_clients.c | 503 +++++++++++++++++++++++++++++
lib/igt_drm_clients.h | 87 ++++++
lib/igt_drm_fdinfo.c | 50 ++-
lib/igt_drm_fdinfo.h | 16 +-
lib/meson.build | 8 +
tests/i915/drm_fdinfo.c | 19 +-
tools/gputop.c | 260 +++++++++++++++
tools/intel_gpu_top.c | 677 +++++++++++-----------------------------
tools/meson.build | 7 +-
9 files changed, 1113 insertions(+), 514 deletions(-)
create mode 100644 lib/igt_drm_clients.c
create mode 100644 lib/igt_drm_clients.h
create mode 100644 tools/gputop.c
--
2.34.1
WARNING: multiple messages have this Message-ID (diff)
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: igt-dev@lists.freedesktop.org, Intel-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH i-g-t 0/8] Vendor agnostic gputop
Date: Fri, 11 Nov 2022 15:58:36 +0000 [thread overview]
Message-ID: <20221111155844.3290531-1-tvrtko.ursulin@linux.intel.com> (raw)
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
This is a pile of patches which implements a rudimentary vendor agnostic gputop
tool based of the new DRM spec as documented in
Documentation/gpu/drm-usage-stats.rst.
First part of the series is code refactoring which should be reasonably stable.
I've tested it all while working on it both against intel_gpu_top and gputop.
Last patch is the actual tool itself. It works but it is rather rudimentary
which is hopefully good enough for a start.
Fundamental difference between intel_gpu_top and gputop is that the former is
centered around a single card and only shows processes belonging to it. Gputop
on the other hand has an idea to show all processes with DRM file descriptors
open and sort them into groups per card. It also makes no effort to provide
sorting modes, well any interactivity, or any pretty names for GPUs or engines.
It looks like this:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DRM minor 0
PID NAME render copy video
3816 kwin_x11 |███▎ || || || |
3523 Xorg |▊ || || || |
1120449 mpv | || ||▋ || |
1120529 glxgears |▋ || || || |
1120449 mpv |▍ || || || |
3860 plasmashell |▏ || || || |
4764 krunner | || || || |
575206 chrome | || || || |
833481 firefox | || || || |
892924 thunderbird | || || || |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I did test it as well with two cards and confirmed that too works.
Rob Clark also tested it with a patch which exports the respective data from the
msm driver and confirmed it works fine. Christian König tested it with in
progress patches for amdgpu and that worked as well.
v2:
* Fixed SPDX headers and added a bunch of code comments/docs throughout.
Tvrtko Ursulin (8):
lib: Extract igt_drm_clients from intel_gpu_top
libdrmfdinfo: Allow specifying custom engine map
libdrmclients: Record client drm minor
libdrmclient: Support multiple DRM cards
libdrmfdinfo: Track largest engine index
libdrmclient/intel_gpu_top: Decouple hardcoded engine assumptions
libdrmclient: Enforce client status sort order in the library
gputop: Basic vendor agnostic GPU top tool
lib/igt_drm_clients.c | 503 +++++++++++++++++++++++++++++
lib/igt_drm_clients.h | 87 ++++++
lib/igt_drm_fdinfo.c | 50 ++-
lib/igt_drm_fdinfo.h | 16 +-
lib/meson.build | 8 +
tests/i915/drm_fdinfo.c | 19 +-
tools/gputop.c | 260 +++++++++++++++
tools/intel_gpu_top.c | 677 +++++++++++-----------------------------
tools/meson.build | 7 +-
9 files changed, 1113 insertions(+), 514 deletions(-)
create mode 100644 lib/igt_drm_clients.c
create mode 100644 lib/igt_drm_clients.h
create mode 100644 tools/gputop.c
--
2.34.1
WARNING: multiple messages have this Message-ID (diff)
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: igt-dev@lists.freedesktop.org, Intel-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Subject: [igt-dev] [PATCH i-g-t 0/8] Vendor agnostic gputop
Date: Fri, 11 Nov 2022 15:58:36 +0000 [thread overview]
Message-ID: <20221111155844.3290531-1-tvrtko.ursulin@linux.intel.com> (raw)
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
This is a pile of patches which implements a rudimentary vendor agnostic gputop
tool based of the new DRM spec as documented in
Documentation/gpu/drm-usage-stats.rst.
First part of the series is code refactoring which should be reasonably stable.
I've tested it all while working on it both against intel_gpu_top and gputop.
Last patch is the actual tool itself. It works but it is rather rudimentary
which is hopefully good enough for a start.
Fundamental difference between intel_gpu_top and gputop is that the former is
centered around a single card and only shows processes belonging to it. Gputop
on the other hand has an idea to show all processes with DRM file descriptors
open and sort them into groups per card. It also makes no effort to provide
sorting modes, well any interactivity, or any pretty names for GPUs or engines.
It looks like this:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DRM minor 0
PID NAME render copy video
3816 kwin_x11 |███▎ || || || |
3523 Xorg |▊ || || || |
1120449 mpv | || ||▋ || |
1120529 glxgears |▋ || || || |
1120449 mpv |▍ || || || |
3860 plasmashell |▏ || || || |
4764 krunner | || || || |
575206 chrome | || || || |
833481 firefox | || || || |
892924 thunderbird | || || || |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I did test it as well with two cards and confirmed that too works.
Rob Clark also tested it with a patch which exports the respective data from the
msm driver and confirmed it works fine. Christian König tested it with in
progress patches for amdgpu and that worked as well.
v2:
* Fixed SPDX headers and added a bunch of code comments/docs throughout.
Tvrtko Ursulin (8):
lib: Extract igt_drm_clients from intel_gpu_top
libdrmfdinfo: Allow specifying custom engine map
libdrmclients: Record client drm minor
libdrmclient: Support multiple DRM cards
libdrmfdinfo: Track largest engine index
libdrmclient/intel_gpu_top: Decouple hardcoded engine assumptions
libdrmclient: Enforce client status sort order in the library
gputop: Basic vendor agnostic GPU top tool
lib/igt_drm_clients.c | 503 +++++++++++++++++++++++++++++
lib/igt_drm_clients.h | 87 ++++++
lib/igt_drm_fdinfo.c | 50 ++-
lib/igt_drm_fdinfo.h | 16 +-
lib/meson.build | 8 +
tests/i915/drm_fdinfo.c | 19 +-
tools/gputop.c | 260 +++++++++++++++
tools/intel_gpu_top.c | 677 +++++++++++-----------------------------
tools/meson.build | 7 +-
9 files changed, 1113 insertions(+), 514 deletions(-)
create mode 100644 lib/igt_drm_clients.c
create mode 100644 lib/igt_drm_clients.h
create mode 100644 tools/gputop.c
--
2.34.1
next reply other threads:[~2022-11-11 15:59 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-11 15:58 Tvrtko Ursulin [this message]
2022-11-11 15:58 ` [igt-dev] [PATCH i-g-t 0/8] Vendor agnostic gputop Tvrtko Ursulin
2022-11-11 15:58 ` [Intel-gfx] " Tvrtko Ursulin
2022-11-11 15:58 ` [PATCH i-g-t 1/8] lib: Extract igt_drm_clients from intel_gpu_top Tvrtko Ursulin
2022-11-11 15:58 ` [igt-dev] " Tvrtko Ursulin
2022-11-11 15:58 ` [Intel-gfx] " Tvrtko Ursulin
2022-11-11 15:58 ` [PATCH i-g-t 2/8] libdrmfdinfo: Allow specifying custom engine map Tvrtko Ursulin
2022-11-11 15:58 ` [igt-dev] " Tvrtko Ursulin
2022-11-11 15:58 ` [Intel-gfx] " Tvrtko Ursulin
2022-11-11 15:58 ` [PATCH i-g-t 3/8] libdrmclients: Record client drm minor Tvrtko Ursulin
2022-11-11 15:58 ` [igt-dev] " Tvrtko Ursulin
2022-11-11 15:58 ` [Intel-gfx] " Tvrtko Ursulin
2022-11-11 15:58 ` [PATCH i-g-t 4/8] libdrmclient: Support multiple DRM cards Tvrtko Ursulin
2022-11-11 15:58 ` [igt-dev] " Tvrtko Ursulin
2022-11-11 15:58 ` [Intel-gfx] " Tvrtko Ursulin
2022-11-11 15:58 ` [PATCH i-g-t 5/8] libdrmfdinfo: Track largest engine index Tvrtko Ursulin
2022-11-11 15:58 ` [igt-dev] " Tvrtko Ursulin
2022-11-11 15:58 ` [Intel-gfx] " Tvrtko Ursulin
2022-11-11 15:58 ` [PATCH i-g-t 6/8] libdrmclient/intel_gpu_top: Decouple hardcoded engine assumptions Tvrtko Ursulin
2022-11-11 15:58 ` [igt-dev] " Tvrtko Ursulin
2022-11-11 15:58 ` [Intel-gfx] " Tvrtko Ursulin
2022-11-11 15:58 ` [PATCH i-g-t 7/8] libdrmclient: Enforce client status sort order in the library Tvrtko Ursulin
2022-11-11 15:58 ` [igt-dev] " Tvrtko Ursulin
2022-11-11 15:58 ` [Intel-gfx] " Tvrtko Ursulin
2022-11-11 15:58 ` [PATCH i-g-t 8/8] gputop: Basic vendor agnostic GPU top tool Tvrtko Ursulin
2022-11-11 15:58 ` [igt-dev] " Tvrtko Ursulin
2022-11-11 15:58 ` [Intel-gfx] " Tvrtko Ursulin
2022-11-16 13:43 ` Philipp Zabel
2022-11-16 13:43 ` [igt-dev] " Philipp Zabel
2022-11-16 13:43 ` [Intel-gfx] " Philipp Zabel
2022-11-11 17:22 ` [igt-dev] ✓ Fi.CI.BAT: success for Vendor agnostic gputop (rev4) Patchwork
2022-11-12 10:19 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-01-26 17:02 ` [Intel-gfx] [PATCH i-g-t 0/8] Vendor agnostic gputop Kamil Konieczny
2023-01-26 17:02 ` [igt-dev] " Kamil Konieczny
2023-01-27 13:41 ` [Intel-gfx] [igt-dev] " Tvrtko Ursulin
2023-01-27 13:41 ` [igt-dev] [Intel-gfx] " Tvrtko Ursulin
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=20221111155844.3290531-1-tvrtko.ursulin@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=igt-dev@lists.freedesktop.org \
--cc=tvrtko.ursulin@intel.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 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.