AMD-GFX Archive mirror
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tursulin@igalia.com>
To: amd-gfx@lists.freedesktop.org
Cc: kernel-dev@igalia.com, Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Subject: [RFC 0/5] Add capacity key to fdinfo
Date: Tue, 30 Apr 2024 18:27:43 +0100	[thread overview]
Message-ID: <20240430172748.61576-1-tursulin@igalia.com> (raw)

From: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>

I have noticed AMD GPUs can have more than one "engine" (ring?) of the same type
but amdgpu is not reporting that in fdinfo using the capacity engine tag.

This series is therefore an attempt to improve that, but only an RFC since it is
quite likely I got stuff wrong on the first attempt. Or if not wrong it may not
be very beneficial in AMDs case.

So I tried to figure out how to count and store the number of instances of an
"engine" type and spotted that could perhaps be used in more than one place in
the driver. I was more than a little bit confused by the ip_instance and uapi
rings, then how rings are selected to context entities internally. Anyway..
hopefully it is a simple enough series to easily spot any such large misses.

End result should be that, assuming two "engine" instances, one fully loaded and
one idle will only report client using 50% of that engine type.

Tvrtko Ursulin (5):
  drm/amdgpu: Cache number of rings per hw ip type
  drm/amdgpu: Use cached number of rings from the AMDGPU_INFO_HW_IP_INFO
    ioctl
  drm/amdgpu: Skip not present rings in amdgpu_ctx_mgr_usage
  drm/amdgpu: Show engine capacity in fdinfo
  drm/amdgpu: Only show VRAM in fdinfo if it exists

 drivers/gpu/drm/amd/amdgpu/amdgpu.h        |  1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c    |  3 ++
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 14 +++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c | 39 +++++++++-----
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c    | 62 +++-------------------
 5 files changed, 49 insertions(+), 70 deletions(-)

-- 
2.44.0

             reply	other threads:[~2024-04-30 17:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-30 17:27 Tvrtko Ursulin [this message]
2024-04-30 17:27 ` [RFC 1/5] drm/amdgpu: Cache number of rings per hw ip type Tvrtko Ursulin
2024-04-30 17:27 ` [RFC 2/5] drm/amdgpu: Use cached number of rings from the AMDGPU_INFO_HW_IP_INFO ioctl Tvrtko Ursulin
2024-04-30 17:27 ` [RFC 3/5] drm/amdgpu: Skip not present rings in amdgpu_ctx_mgr_usage Tvrtko Ursulin
2024-04-30 17:27 ` [RFC 4/5] drm/amdgpu: Show engine capacity in fdinfo Tvrtko Ursulin
2024-04-30 17:27 ` [RFC 5/5] drm/amdgpu: Only show VRAM in fdinfo if it exists Tvrtko Ursulin
2024-05-02 13:16   ` Christian König
2024-05-02 14:46     ` Tvrtko Ursulin
2024-05-03 13:47       ` Alex Deucher
2024-05-03 14:01         ` Tvrtko Ursulin
2024-05-03 14:43           ` Alex Deucher
2024-04-30 18:32 ` [RFC 0/5] Add capacity key to fdinfo Alex Deucher
2024-05-01 13:27   ` Tvrtko Ursulin
2024-05-02 13:07     ` Christian König
2024-05-02 14:43       ` Tvrtko Ursulin
2024-05-02 15:00         ` Alex Deucher
2024-05-03 11:50           ` Tvrtko Ursulin
2024-05-03 14:28             ` Alex Deucher
2024-05-07  8:57               ` 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=20240430172748.61576-1-tursulin@igalia.com \
    --to=tursulin@igalia.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=kernel-dev@igalia.com \
    --cc=tvrtko.ursulin@igalia.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 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 read-only IMAP folder(s) and NNTP newsgroup(s).