[Intel-gfx] [RFC 09/12] drm/i915: Track per-context engine busyness
Chris Wilson
chris at chris-wilson.co.uk
Tue Mar 10 18:36:05 UTC 2020
Quoting Tvrtko Ursulin (2020-03-09 18:31:26)
> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
>
> Some customers want to know how much of the GPU time are their clients
> using in order to make dynamic load balancing decisions.
>
> With the hooks already in place which track the overall engine busyness,
> we can extend that slightly to split that time between contexts.
>
> v2: Fix accounting for tail updates.
> v3: Rebase.
> v4: Mark currently running contexts as active on stats enable.
> v5: Include some headers to fix the build.
> v6: Added fine grained lock.
> v7: Convert to seqlock. (Chris Wilson)
> v8: Rebase and tidy with helpers.
> v9: Refactor.
> v10: Move recording start to promotion. (Chris)
> v11: Consolidate duplicated code. (Chris)
> v12: execlists->active cannot be NULL. (Chris)
> v13: Move start to set_timeslice. (Chris)
>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> ---
> drivers/gpu/drm/i915/gt/intel_context.c | 20 +++++++++++
> drivers/gpu/drm/i915/gt/intel_context.h | 13 +++++++
> drivers/gpu/drm/i915/gt/intel_context_types.h | 9 +++++
> drivers/gpu/drm/i915/gt/intel_engine_cs.c | 15 ++++++--
> drivers/gpu/drm/i915/gt/intel_lrc.c | 34 ++++++++++++++++++-
> 5 files changed, 88 insertions(+), 3 deletions(-)
We also should put together a basic selftest to accompany its
introduction. Just something that runs a context (using a spinner) for
50ms and check the stats report ~50ms.
-Chris
More information about the Intel-gfx
mailing list