[igt-dev] [Intel-gfx] [RFC i-g-t] intel_gpu_top: User friendly device listing
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Wed Oct 14 12:01:01 UTC 2020
On 14/10/2020 12:05, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2020-10-14 11:48:53)
>> From: Tvrtko Ursulin <tvrtko.ursulin at 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 at sc:~/igt/build# tools/intel_gpu_top -L
card0 8086:193B drm:/dev/dri/card0
└─renderD128 drm:/dev/dri/renderD128
root at 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
More information about the igt-dev
mailing list