Repository navigation
obs-gpu-status: per-process GPU utilization from DRM fdinfo - #1224
Merged
Merged
Conversation
parse_fdinfo reads drm-driver, drm-pdev, drm-client-id and the engine counters (drm-engine-<e> ns with drm-engine-capacity-<e>, xe's drm-cycles and drm-total-cycles). fdinfo_utilization dedupes fds by client id, keeps the render adapter's drm-pdev and reports the busiest engine. Fixes #1023
zackees
force-pushed
the
feat/1023-drm-fdinfo
branch
from
October 17, 2026 11:25
d95cfe5 to
bff8a86
Compare
zackees
enabled auto-merge
October 17, 2026 11:25
3 of 6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1023. Stacked on #1222 (uses its
Utilization); retarget to master once #1222 merges.obs_gpu_status::fdinfo:parse_fdinfo(text):drm-driver,drm-pdev,drm-client-id, engines fromdrm-engine-<e>: N ns+drm-engine-capacity-<e>(i915, amdgpu) and xe'sdrm-cycles-<e>/drm-total-cycles-<e>. Non-DRM or id-less fdinfo isNone.read_fdinfo(dir): every DRM client in/proc/self/fdinfo(or a fixture dir).fdinfo_utilization(before, after, pdev, elapsed_ns): fds deduped by client id, filtered bydrm-pdev, per-engine busy delta summed over clients against elapsed × capacity (or total cycles), busiest engine reported, capped at 100.RED (32c84ef): 11 Tier 1 tests on i915/xe/amdgpu fixture texts (per docs.kernel.org/gpu/drm-usage-stats.html), incl. two fds sharing a client id; 10 failed against stubs.
GREEN (d95cfe5):
soldr cargo test -p obs-gpu-status80 passed;./lintok.Not done: the polling-cost measurement on real i915/xe/amdgpu hardware (this host is NVIDIA proprietary only, no engine keys). New code, no C original: Tiers 2/3 n/a.