[Intel-gfx] [PATCH i-g-t v2] tests/perf_pmu: Use absolute tolerance in accuracy tests

Chris Wilson chris at chris-wilson.co.uk
Fri Mar 9 20:49:38 UTC 2018


Quoting Tvrtko Ursulin (2018-03-09 11:54:13)
> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> 
> We need to use absolute tolerance when asserting on percentages. Relative
> tolerance in this case is unfair and inaccurate since it's strictness
> varies with relative target busyness.
> 
> v2:
>  * Do not include spin batch edit and submit into measured time.
>  * Open PMU before child is in test PWM phase.
>  * No need to emit test PWM for twice as long with the new explicit
>    synchroniazation via pipe.
>  * Log test duration in ms for better readability.
>  * Drop inverse assert. (Chris Wilson)
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk> # v1
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>

Would be nice to add a comment now we have a reasonable suspicion:

> @@ -1537,19 +1545,16 @@ accuracy(int gem_fd, const struct intel_execution_engine2 *e,
>  
>                         igt_nsec_elapsed(&test_start);
>                         do {
> -                               struct timespec t_busy = { };
> -                               unsigned int target_idle_us;
> -
> -                               igt_nsec_elapsed(&t_busy);
> +                               unsigned int target_idle_us, t_busy;
>  
>                                 /* Restart the spinbatch. */
>                                 __rearm_spin_batch(spin);
>                                 __submit_spin_batch(gem_fd, &obj, e);

/*
 * Note that the submission may be delayed to a tasklet (ksoftirqd)
 * which cannot run until we sleep as we hog the cpu (we are RT).
 */

> -                               measured_usleep(busy_us);
> +                               t_busy = measured_usleep(busy_us);
>                                 igt_spin_batch_end(spin);
>                                 gem_sync(gem_fd, obj.handle);

And back to thinking how we can kick the tasklet, or kick the habit.
-Chris


More information about the Intel-gfx mailing list