Re: [PATCH 12/20] drm/i915/gt: Track the overall awake/busy time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Matthew Brost (2020-12-10 17:51:12)
> On Mon, Dec 07, 2020 at 07:38:16PM +0000, Chris Wilson wrote:
> > Since we wake the GT up before executing a request, and go to sleep as
> > soon as it is retired, the GT wake time not only represents how long the
> > device is powered up, but also provides a summary, albeit an overestimate,
> > of the device runtime (i.e. the rc0 time to compare against rc6 time).
> > 
> > v2: s/busy/awake/
> > 
> > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > ---
> >  drivers/gpu/drm/i915/gt/debugfs_gt_pm.c  |  5 ++-
> >  drivers/gpu/drm/i915/gt/intel_gt_pm.c    | 49 ++++++++++++++++++++++++
> >  drivers/gpu/drm/i915/gt/intel_gt_pm.h    |  2 +
> >  drivers/gpu/drm/i915/gt/intel_gt_types.h | 24 ++++++++++++
> >  drivers/gpu/drm/i915/i915_debugfs.c      |  5 ++-
> >  drivers/gpu/drm/i915/i915_pmu.c          |  6 +++
> >  include/uapi/drm/i915_drm.h              |  1 +
> >  7 files changed, 89 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/gt/debugfs_gt_pm.c b/drivers/gpu/drm/i915/gt/debugfs_gt_pm.c
> > index 174a24553322..8975717ace06 100644
> > --- a/drivers/gpu/drm/i915/gt/debugfs_gt_pm.c
> > +++ b/drivers/gpu/drm/i915/gt/debugfs_gt_pm.c
> > @@ -11,6 +11,7 @@
> >  #include "i915_drv.h"
> >  #include "intel_gt.h"
> >  #include "intel_gt_clock_utils.h"
> > +#include "intel_gt_pm.h"
> >  #include "intel_llc.h"
> >  #include "intel_rc6.h"
> >  #include "intel_rps.h"
> > @@ -558,7 +559,9 @@ static int rps_boost_show(struct seq_file *m, void *data)
> >  
> >       seq_printf(m, "RPS enabled? %s\n", yesno(intel_rps_is_enabled(rps)));
> >       seq_printf(m, "RPS active? %s\n", yesno(intel_rps_is_active(rps)));
> > -     seq_printf(m, "GPU busy? %s\n", yesno(gt->awake));
> > +     seq_printf(m, "GPU busy? %s, %llums\n",
> > +                yesno(gt->awake),
> > +                ktime_to_ms(intel_gt_get_awake_time(gt)));
> 
> I think it would be useful to print the total time the gt has been alive
> too. This would give a nice comparison to total awake time which you
> print here. Should be easy enough to do.

This is the total time for which we hold the wakeref for the GT. What
metric do you have in mind? The C0 counters usually found on the engine?
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux