From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, igt-dev@lists.freedesktop.org
Cc: Intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [RFC i-g-t] intel_gpu_top: User friendly device listing
Date: Wed, 14 Oct 2020 13:01:01 +0100 [thread overview]
Message-ID: <378f58c4-8841-90a0-bf52-67530c2727de@linux.intel.com> (raw)
In-Reply-To: <160267352653.7159.12912041121177674515@build.alporthouse.com>
On 14/10/2020 12:05, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2020-10-14 11:48:53)
>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>> Adding a new device selection print type suitable for user-facing
>> use cases like intel_gpu_top -L and potentially lsgpu.
>>
>> Instead of:
>>
>> sys:/sys/devices/pci0000:00/0000:00:02.0/drm/card0
>> subsystem : drm
>> drm card : /dev/dri/card0
>> parent : sys:/sys/devices/pci0000:00/0000:00:02.0
>>
>> sys:/sys/devices/pci0000:00/0000:00:02.0/drm/renderD128
>> subsystem : drm
>> drm render : /dev/dri/renderD128
>> parent : sys:/sys/devices/pci0000:00/0000:00:02.0
>>
>> sys:/sys/devices/pci0000:00/0000:00:02.0
>> subsystem : pci
>> drm card : /dev/dri/card0
>> drm render : /dev/dri/renderD128
>> vendor : 8086
>> device : 193B
>>
>> New format looks like:
>>
>> card0 8086:193B drm:/dev/dri/card0
>> └─renderD128 drm:/dev/dri/renderD128
>>
>> Advantages are more compact, more readable, one entry per GPU, shorter
>> string to copy and paste to intel_gpu_top -d, or respective usage.
>
> Could you present this as the typical commands and output? I think you
> mean the first as the output of intel_gpu_top -L. What exactly do we now
> feed to -d?
root@sc:~/igt/build# tools/intel_gpu_top -L
card0 8086:193B drm:/dev/dri/card0
└─renderD128 drm:/dev/dri/renderD128
root@sc:~/igt/build# tools/intel_gpu_top -d drm:/dev/dri/card0
I was considering adding a header, but essentially the actual format is just an idea for now. Main point is coming up with something more easily readable by the user, with no multiple entries for the same thing, and compact for easy copy & paste. Motivation was current output on a three GPU system:
sys:/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:01.0/0000:03:00.0/drm/card1
subsystem : drm
drm card : /dev/dri/card1
parent : sys:/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:01.0/0000:03:00.0
sys:/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:01.0/0000:03:00.0/drm/renderD129
subsystem : drm
drm render : /dev/dri/renderD129
parent : sys:/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:01.0/0000:03:00.0
sys:/sys/devices/pci0000:00/0000:00:01.1/0000:06:00.0/0000:07:01.0/0000:08:00.0/drm/card2
subsystem : drm
drm card : /dev/dri/card2
parent : sys:/sys/devices/pci0000:00/0000:00:01.1/0000:06:00.0/0000:07:01.0/0000:08:00.0
sys:/sys/devices/pci0000:00/0000:00:01.1/0000:06:00.0/0000:07:01.0/0000:08:00.0/drm/renderD130
subsystem : drm
drm render : /dev/dri/renderD130
parent : sys:/sys/devices/pci0000:00/0000:00:01.1/0000:06:00.0/0000:07:01.0/0000:08:00.0
sys:/sys/devices/pci0000:00/0000:00:02.0/drm/card0
subsystem : drm
drm card : /dev/dri/card0
parent : sys:/sys/devices/pci0000:00/0000:00:02.0
sys:/sys/devices/pci0000:00/0000:00:02.0/drm/renderD128
subsystem : drm
drm render : /dev/dri/renderD128
parent : sys:/sys/devices/pci0000:00/0000:00:02.0
sys:/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:01.0/0000:03:00.0
subsystem : pci
drm card : /dev/dri/card1
drm render : /dev/dri/renderD129
vendor : 8086
device : 4905
sys:/sys/devices/pci0000:00/0000:00:01.1/0000:06:00.0/0000:07:01.0/0000:08:00.0
subsystem : pci
drm card : /dev/dri/card2
drm render : /dev/dri/renderD130
vendor : 8086
device : 4905
sys:/sys/devices/pci0000:00/0000:00:02.0
subsystem : pci
drm card : /dev/dri/card0
drm render : /dev/dri/renderD128
vendor : 8086
device : 3E98
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2020-10-14 12:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-14 10:48 [Intel-gfx] [RFC i-g-t] intel_gpu_top: User friendly device listing Tvrtko Ursulin
2020-10-14 11:05 ` Chris Wilson
2020-10-14 12:01 ` Tvrtko Ursulin [this message]
2020-10-15 4:36 ` Zbigniew Kempczyński
2020-10-15 8:09 ` Tvrtko Ursulin
2020-10-16 4:07 ` Zbigniew Kempczyński
2020-10-16 9:11 ` Tvrtko Ursulin
2020-10-16 11:48 ` Zbigniew Kempczyński
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=378f58c4-8841-90a0-bf52-67530c2727de@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=chris@chris-wilson.co.uk \
--cc=igt-dev@lists.freedesktop.org \
/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