Commit 53f2b4b4 authored by Chris Wilson's avatar Chris Wilson 🤔

igt/perf_pmu: Keep batch_duration_ns as the minimum measurement duration

We have chosen batch_duration_ns to be the minimum duration we need to
meet our accuracy requirements for legacy ringbuffer PMU sampling. As
such, we need to be careful to use multiples of it during tests, and not
split it into different phases within a test, like multi_client does.
Signed-off-by: Chris Wilson's avatarChris Wilson <>
Cc: Tvrtko Ursulin <>
Reviewed-by: Tvrtko Ursulin's avatarTvrtko Ursulin <>
parent 4c57ff46
......@@ -638,9 +638,9 @@ multi_client(int gem_fd, const struct intel_execution_engine2 *e)
fd[1] = open_pmu(config);
spin = igt_spin_batch_new(gem_fd, 0, e2ring(gem_fd, e), 0);
igt_spin_batch_set_timeout(spin, batch_duration_ns);
igt_spin_batch_set_timeout(spin, 2 * batch_duration_ns);
slept = measured_usleep(batch_duration_ns / 3000);
slept = measured_usleep(batch_duration_ns / 1000);
val[1] = pmu_read_single(fd[1]);
......@@ -651,7 +651,7 @@ multi_client(int gem_fd, const struct intel_execution_engine2 *e)
igt_spin_batch_free(gem_fd, spin);
assert_within_epsilon(val[0], batch_duration_ns, tolerance);
assert_within_epsilon(val[0], 2 * batch_duration_ns, tolerance);
assert_within_epsilon(val[1], slept, tolerance);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment