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

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Tue Mar 10 20:01:25 UTC 2020


On 10/03/2020 18:28, Chris Wilson wrote:
> 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] ?

Let it grow a bit first? :)

Regards,

Tvrtko


More information about the Intel-gfx mailing list