dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
	Rob Clark <robdclark@gmail.com>, Daniel Vetter <daniel@ffwll.ch>
Cc: Intel Graphics Development <Intel-gfx@lists.freedesktop.org>,
	Chris Healy <cphealy@gmail.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	David M Nieto <David.Nieto@amd.com>
Subject: Re: [Intel-gfx] [PATCH 6/7] drm: Document fdinfo format specification
Date: Tue, 25 Jan 2022 11:36:34 +0100	[thread overview]
Message-ID: <8fb3178d-00ce-e738-fdff-bf014e09e78f@amd.com> (raw)
In-Reply-To: <fb6f1a2c-6e23-cfdf-2ce5-80209a005227@linux.intel.com>

Wow, nice.

Certainly +1 from my side to have that generalized, documented and 
uniform among all drivers.

Regards,
Christian.

Am 25.01.22 um 11:24 schrieb Tvrtko Ursulin:
>
> On 21/01/2022 11:50, Tvrtko Ursulin wrote:
>> On 20/01/2022 16:44, Rob Clark wrote:
>
> [snip]
>
>>> If there is a tool somewhere that displays this info, that would be
>>> useful for testing my implementation.
>>
>> I have a patch to Intel specific intel_gpu_top (see 
>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.freedesktop.org%2Fpatch%2F468491%2F%3Fseries%3D98555%26rev%3D1&amp;data=04%7C01%7Cchristian.koenig%40amd.com%7C99e7138493364003d3e908d9dfece57f%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637787030821307243%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=X5Qa7rZkyvplRJ5fJwaKjwa%2FtII9EZmg5PIYMOcqKiA%3D&amp;reserved=0). 
>> I'll have a look to see how much work would it be to extract common 
>> bits into a library and write a quick agnostic tool using it.
>
> I factored out some code from intel_gpu_top in a quick and dirty 
> attempt to make it generic and made a very rudimentary tools/gputop:
>
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcgit.freedesktop.org%2F~tursulin%2Fintel-gpu-tools%2Flog%2F%3Fh%3Dgputop&amp;data=04%7C01%7Cchristian.koenig%40amd.com%7C99e7138493364003d3e908d9dfece57f%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637787030821307243%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=FBhSRN8vyl6zgT8vGZ8kRhWFtt59dZUCHMmeCl9gdnI%3D&amp;reserved=0 
>
>
> If you manage to export the right fdinfo tags (basically 
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.freedesktop.org%2Fpatch%2F468502%2F%3Fseries%3D92574%26rev%3D6&amp;data=04%7C01%7Cchristian.koenig%40amd.com%7C99e7138493364003d3e908d9dfece57f%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637787030821307243%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=a0aBjo%2B2WyfzSfrjWkHteEuZAmncLbO8Z%2F5ypZKumlU%3D&amp;reserved=0)*, 
> with the only local addition I have being the optional 
> "drm-engine-capacity-<str>: <uint>" tag, we may get lucky and tool 
> might even work. Let me know when you try. If it will work you should 
> see something like this:
>
> DRM minor 0
>    PID              NAME    render       copy       video
>   3838          kwin_x11 |█         ||          || ||          |
> 327056               mpv |          ||          ||▌ ||          |
> 327056               mpv |▌         ||          || ||          |
>      1           systemd |▍         ||          || ||          |
>   3884       plasmashell |          ||          || ||          |
>   4794           krunner |          ||          || ||          |
>   4836       thunderbird |          ||          || ||          |
> 296733         GeckoMain |          ||          || ||          |
>
> Regards,
>
> Tvrtko
>
> *) Or for more reference this is how the i915 output looks like:
>
> $ sudo cat /proc/7296/fdinfo/10
> pos:    0
> flags:  02100002
> mnt_id: 26
> ino:    501
> drm-driver:     i915
> drm-pdev:       0000:00:02.0
> drm-client-id:  22
> drm-engine-render:      196329331 ns
> drm-engine-copy:        0 ns
> drm-engine-video:       0 ns
> drm-engine-capacity-video:      2
> drm-engine-video-enhance:       0 ns
>
> P.S. There is no AMD support in the current code, or nothing for 
> memory either. Both can be added later.


  reply	other threads:[~2022-01-25 10:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-06 16:55 [PATCH 0/7] Per client GPU stats Tvrtko Ursulin
2022-01-06 16:55 ` [PATCH 1/7] drm/i915: Explicitly track DRM clients Tvrtko Ursulin
2022-01-06 16:55 ` [PATCH 2/7] drm/i915: Make GEM contexts " Tvrtko Ursulin
2022-01-06 16:55 ` [PATCH 3/7] drm/i915: Track runtime spent in closed and unreachable GEM contexts Tvrtko Ursulin
2022-01-06 16:55 ` [PATCH 4/7] drm/i915: Track all user contexts per client Tvrtko Ursulin
2022-01-06 16:55 ` [PATCH 5/7] drm/i915: Track context current active time Tvrtko Ursulin
2022-01-06 16:55 ` [PATCH 6/7] drm: Document fdinfo format specification Tvrtko Ursulin
2022-01-19 15:08   ` Daniel Vetter
2022-01-20 10:30     ` Tvrtko Ursulin
2022-01-20 16:44     ` [Intel-gfx] " Rob Clark
2022-01-21 11:50       ` Tvrtko Ursulin
2022-01-25 10:24         ` Tvrtko Ursulin
2022-01-25 10:36           ` Christian König [this message]
2022-02-21 11:14           ` Tvrtko Ursulin
2022-01-06 16:55 ` [PATCH 7/7] drm/i915: Expose client engine utilisation via fdinfo Tvrtko Ursulin
2022-02-19  0:51   ` Umesh Nerlige Ramappa
2022-02-22 12:31     ` 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=8fb3178d-00ce-e738-fdff-bf014e09e78f@amd.com \
    --to=christian.koenig@amd.com \
    --cc=David.Nieto@amd.com \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=cphealy@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=robdclark@gmail.com \
    --cc=tvrtko.ursulin@linux.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 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).