]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Make debugfs/per_file_stats scale better
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 8 Aug 2019 16:24:07 +0000 (17:24 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 8 Aug 2019 20:54:20 +0000 (21:54 +0100)
commit56748eb01351c3bcb7b5ca68053c0ca82c7b851f
tree219a5b1090c99150a5679ac7fec25fc8781b18bc
parent8ba1ac55966bbe7af4c3630690e6bb2f96bba113
drm/i915: Make debugfs/per_file_stats scale better

Currently we walk the entire list of obj->vma for each obj within a file
to find the matching vma of this context. Since we know we are searching
for a particular vma bound to a user context, we can use the rbtree to
search for it rather than repeatedly walk everything.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190808162407.28121-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_debugfs.c