[igt-dev] [PATCH igt] igt/perf_pmu: Use a self-correcting busy pwm

Chris Wilson chris at chris-wilson.co.uk
Tue Feb 20 13:45:09 UTC 2018


Quoting Chris Wilson (2018-02-20 13:25:21)
> Convert the busy pwm from using a single calibration pass with a fixed
> target into a self-correcting pwm that tries to adjust how long to sleep
> on each pwm in order to converge at the target busy %%.
> 
> Being self-correcting, it should fare better against the more variable
> systems CI presents.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105157
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> ---
> -       assert_within_epsilon(busy_r, (double)target_busy_pct / 100.0, 0.15);
> +       assert_within_epsilon(busy_r, expected, 0.15);

One thing that struck me here is that the tolerance end ups being very
one-sided in that for low busy %% we are stricter than for high %%.

We should add
	assert_within_epsilon(1 - busy_r, 1 - expected, 0.15);
-Chris
>   


More information about the igt-dev mailing list