[Intel-gfx] [PATCH] drm/i915/gt: Switch to manual evaluation of RPS

Chris Wilson chris at chris-wilson.co.uk
Mon Apr 27 08:27:32 UTC 2020


Quoting Andi Shyti (2020-04-27 00:28:57)
> Hi Chris,
> 
> On Sat, Apr 25, 2020 at 07:54:00PM +0100, Chris Wilson wrote:
> > As with the realisation for soft-rc6, we respond to idling the engines
> > within microseconds, far faster than the response times for HW RC6 and
> > RPS. Furthermore, our fast parking upon idle, prevents HW RPS from
> > running for many desktop workloads, as the RPS evaluation intervals are
> > on the order of tens of milliseconds, but the typical workload is just a
> > couple of milliseconds, but yet we still need to determine the best
> > frequency for user latency versus power.
> > 
> > Recognising that the HW evaluation intervals are a poor fit, and that
> > they were deprecated [in bspec at least] from gen10, start to wean
> > ourselves off them and replace the EI with a timer and our accurate
> > busy-stats. The principle benefit of manually evaluating RPS intervals
> > is that we can be more responsive for better performance and powersaving
> > for both spiky workloads and steady-state.
> 
> basically, when you unpark, you wait a bit depending on the
> workload before actually setting the rps and you do this by
> creating a timer.

Right instead of the HW using a timer internally and checking it's C0
counters, we use a timer on the CPU and check out busy metrics.

It's a win because we can be more flexible in how often we run and
reclock the GPU, as well as preserving statistics across idle periods.
Not to mention that tgl EI are snafu.

> > +static bool has_busy_stats(struct intel_rps *rps)
> > +{
> > +     struct intel_engine_cs *engine;
> > +     enum intel_engine_id id;
> > +
> > +     return HAS_EXECLISTS(rps_to_i915(rps)); /* XXX init ordering */
> > +
> > +     for_each_engine(engine, rps_to_gt(rps), id) {
> > +             if (!intel_engine_supports_stats(engine))
> > +                     return false;
> > +     }
> > +
> > +     return true;
> > +}
> 
> mh? what's the exit point here?

It will be once we have a way of determining whether or not we have
busy-stats, after determining that support. At the moment, that is setup
too late for us to us in init. If I pull it to rps_enable, maybe...
-Chris


More information about the Intel-gfx mailing list