Close any open drm device after engine initialization in GPUTOP
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 5 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | tools/gputop/xe_gputop: Close card_fd after engine population in xe_populate_engines()tools/ | +4 | 0 replies | |
| 2/2 | tools/gputop/gputop: Enable support for multiple GPUs and instancestools/ tools/ tools/ | +220 | 5 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH i-g-t 0/2] Close any open drm device after engine initialization in GPUTOP
During the engine initialization for a specific device, igt helper
functions need card_fd to access each engine and respective configs which is required in obtaining the busyness of the same through PMU. But during KMS tests no other DRM client should run. So once the required configs and engines are obtained, the card_fd should be closed as opened card_fd in gputop makes appear itself as DRM client.
GPUTOP is also capable of running without superuser access through settingCAP_PERFMON or an appropriate perf_event_paranoid setting, although in that case GPU client busyness is not available as without being superuser, other processes' fd could not be inspected.
Steps to enable GPUTOP to run without root (using CAP_PERFMON):
$ cd /path/to/igt-gpu-tools/ $ sudo setcap cap_perfmon=+ep $(pwd)/build/tools/gputop/gputop $ sudo sh -c "echo $(pwd)/build/lib > /etc/ld.so.conf.d/lib-igt.conf" $ sudo ldconfig Steps to revert once done: $ sudo setcap cap_perfmon=-ep $(pwd)/build/tools/gputop/gputop $ sudo rm /etc/ld.so.conf.d/lib-igt.conf $ sudo ldconfig
Steps to enable GPUTOP to run without root (using perf_event_paranoid):
# Save the current value
$ orig_val=$(sysctl -n kernel.perf_event_paranoid) # Set the value to allow running GPUTOP without root privileges $ sudo sysctl -w kernel.perf_event_paranoid=-1 Steps to revert once done: $ sudo sysctl -w kernel.perf_event_paranoid=$orig_val
Soham Purkait (2):
tools/gputop/xe_gputop: Close card_fd after engine population in
xe_populate_engines()
tools/gputop/gputop: Enable support for multiple GPUs and instances
tools/{ => gputop}/gputop.c | 253 ++++++++++++++++++++++++++++++------
tools/gputop/meson.build | 6 +
tools/gputop/xe_gputop.c | 6 +-
tools/meson.build | 6 +-
4 files changed, 224 insertions(+), 47 deletions(-)
rename tools/{ => gputop}/gputop.c (63%)
create mode 100644 tools/gputop/meson.buildSignature · 1 line
2.34.1