[Intel-gfx] [RFC 06/12] drm/i915: Track runtime spent in closed GEM contexts

Chris Wilson chris at chris-wilson.co.uk
Tue Mar 10 18:28:14 UTC 2020


Quoting Tvrtko Ursulin (2020-03-09 18:31:23)
> diff --git a/drivers/gpu/drm/i915/i915_drm_client.h b/drivers/gpu/drm/i915/i915_drm_client.h
> index 7825df32798d..10752107e8c7 100644
> --- a/drivers/gpu/drm/i915/i915_drm_client.h
> +++ b/drivers/gpu/drm/i915/i915_drm_client.h
> @@ -16,6 +16,8 @@
>  #include <linux/sched.h>
>  #include <linux/xarray.h>
>  
> +#include "gt/intel_engine_types.h"
> +
>  struct i915_drm_clients {
>         struct mutex lock;
>         struct xarray xarray;
> @@ -43,6 +45,11 @@ struct i915_drm_client {
>                 struct device_attribute pid;
>                 struct device_attribute name;
>         } attr;
> +
> +       /**
> +        * @past_runtime: Accumulation of pphwsp runtimes from closed contexts.
> +        */
> +       atomic64_t past_runtime[MAX_ENGINE_CLASS + 1];

Just to plant a seed: i915_drm_client_stats.[ch] ?
-Chris


More information about the Intel-gfx mailing list