mbox series

[0/3] drm/i915: Apply waitboosting before fence wait

Message ID cover.1656911806.git.karolina.drobnik@intel.com (mailing list archive)
Headers show
Series drm/i915: Apply waitboosting before fence wait | expand

Message

Karolina Drobnik July 5, 2022, 10:57 a.m. UTC
Waitboost is a heuristic that detects latency sensitive workloads waiting for
the results from previous execution. The wait can be seen as GPU
under-utilisation by RPS, Render Power State management, which might lower the
GPU frequency to save power. Limiting the frequency means more waiting for
results, which is undesirable for submissions with tight time constraints.
To circumvent this, with waitboost we iteratively check the list of fences
during gem_wait to see if any of them is stalled waiting for GPU. If such is
found, and the request hasn't yet started its execution, we temporarily bump up
the GPU frequency, so we get the required results as soon as possible.

Commit 047a1b877ed4 ("dma-buf & drm/amdgpu: remove dma_resv workaround") changes
the fences order and how they are iterated. Under this new scheme, we would wait
on each fence that starts executing, rendering them not suitable for waitboost.

To avoid situation like this, inspect the entire list of fences dma-resv
earlier, before gem_wait, instead of sequentially waiting for each of them,
applying the boost when needed.

Test-with: 20220705103551.3720180-1-karolina.drobnik@intel.com

Chris Wilson (3):
  drm/i915/gem: Look for waitboosting across the whole object prior to
    individual waits
  drm/i915: Bump GT idling delay to 2 jiffies
  drm/i915/gt: Only kick the signal worker if there's been an update

 drivers/gpu/drm/i915/gem/i915_gem_wait.c    | 35 +++++++++++++++++++++
 drivers/gpu/drm/i915/gt/intel_breadcrumbs.c |  3 +-
 drivers/gpu/drm/i915/i915_active.c          |  2 +-
 3 files changed, 38 insertions(+), 2 deletions(-)

--
2.25.1