[Intel-gfx] [PATCH] drm/i915: Compute a loadavg as the number of pending requests
daniel at ffwll.ch
Sun Jan 8 19:17:21 CET 2012
On Sat, Jan 07, 2012 at 08:47:49PM -0200, Eugeni Dodonov wrote:
> On Sat, Jan 7, 2012 at 19:03, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> > The number of pending requests correlates to the number of batches
> > queued and so with the amount of work being performed by the GPU. We
> > borrow the concept of loadavg from the scheduler, using the count of
> > batches as the count of runnables, and simply adjust the timescales for
> > a 60x higher sample rate, i.e. the three values are the load average for
> > approximately the last 1s, 5s and 15 respectively. The counter is
> > started only once GPU activity is detected, and is then sampled at 60 Hz
> > until 10s after the GPU goes idle before the counters are reset and
> > sampling ceases.
> > Sample output for running aa10text under gnome-shell:
> > Total: 55.29 57.54 61.14
> > render ring: 54.80 57.17 60.76
> > gen6 bsd ring: 0.00 0.00 0.00
> > blt ring: 0.48 0.37 0.37
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > Cc: Eugeni Dodonov <eugeni.dodonov at intel.com>
> Very nice one!
> Reviewed-by: Eugeni Dodonov <eugeni.dodonov at intel.com>
> Acked-by: Eugeni Dodonov <eugeni.dodonov at intel.com>
I think if this really should be merged upstream, it needs to be more
optional (i.e. only fire it up if someone reads out the load_avg). People
will complain if we wake up 60x per second on a mostly idle machine just
for statistics ...
I think we should only start this if somebody reads i915_load_avg and then
switch it off 60s or so after the last read.
Mail: daniel at ffwll.ch
Mobile: +41 (0)79 365 57 48
More information about the Intel-gfx