[Intel-gfx] [igt-dev] [PATCH i-g-t 03/24] i915/gem_exec_schedule: Measure semaphore power consumption

Chris Wilson chris at chris-wilson.co.uk
Tue Mar 26 09:23:41 UTC 2019


Quoting Tvrtko Ursulin (2019-03-26 08:46:34)
> 
> On 22/03/2019 09:21, Chris Wilson wrote:
> > +static void measure_semaphore_power(int i915)
> > +{
> > +     struct gpu_power power;
> > +     unsigned int engine, signaler;
> > +
> > +     igt_require(gpu_power_open(&power) == 0);
> > +
> > +     for_each_physical_engine(i915, signaler) {
> > +             struct gpu_power_sample s_spin[2];
> > +             struct gpu_power_sample s_sema[2];
> > +             double baseline, total;
> > +             int64_t jiffie = 1;
> > +             igt_spin_t *spin;
> > +
> > +             spin = __igt_spin_batch_new(i915,
> > +                                         .engine = signaler,
> > +                                         .flags = IGT_SPIN_POLL_RUN);
> 
>                 if (!spin)
>                         continue;
> 
> To skip over !can_store_dword, since you are using the low level 
> constructor which doesn't check.

True, will need store-dword checking. Too much pain from
spin_batch_new() mystery locking up inside loops has caused me to shy
away from using it.

> > +             gem_wait(i915, spin->handle, &jiffie); /* waitboost */
> 
> Waitboost why? Will it be deterministic either way?

There's nothing in here that should trigger a waitboost, the idea was to
put the GPU into as pessimistic state as possible to measure peak power
consumption. We could set the freq to min/max via sysfs to see if there
is a significant difference. There's always another test waiting in the
corner.
-Chris


More information about the Intel-gfx mailing list