diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2020-10-13 17:59:00 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2020-12-13 12:01:30 +0000 |
commit | 507bda6efeda7b499dd3f8fafbb093607d72b6e2 (patch) | |
tree | 461d53f697d57d4627f18a9008920bfb33cbec25 | |
parent | b57d4c6453defb16a116b69e0c4e485dcbfabf7f (diff) |
i915/gem_exec_balancer: Check balancer submission latency
While CI is unreliable in terms of detecting performance deltas, it
should still be able to detect when we are orders of magnitude off
expectations. In this case, latency/throughput when submitting to a load
balancer should be on par with a native engine.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | tests/i915/gem_exec_balancer.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/i915/gem_exec_balancer.c b/tests/i915/gem_exec_balancer.c index 5efd586a..9551ea76 100644 --- a/tests/i915/gem_exec_balancer.c +++ b/tests/i915/gem_exec_balancer.c @@ -2380,6 +2380,7 @@ static void nop(int i915) for (int class = 0; class < 32; class++) { struct i915_engine_class_instance *ci; unsigned int count; + double max = 0; uint32_t ctx; ci = list_engines(i915, 1u << class, &count); @@ -2410,6 +2411,8 @@ static void nop(int i915) t = igt_nsec_elapsed(&tv) * 1e-3 / nops; igt_info("%s:%d %.3fus\n", class_to_str(class), n, t); + if (t > max) + max = t; } { @@ -2433,9 +2436,10 @@ static void nop(int i915) t = igt_nsec_elapsed(&tv) * 1e-3 / nops; igt_info("%s:* %.3fus\n", class_to_str(class), t); + if (t > 10 * max) + igt_warn("Balancer submission %.1fx worse than normal!\n", t / max); } - igt_fork(child, count) { struct drm_i915_gem_execbuffer2 execbuf = { .buffers_ptr = to_user_pointer(&batch), @@ -2476,6 +2480,8 @@ static void nop(int i915) t = igt_nsec_elapsed(&tv) * 1e-3 / nops; igt_info("[%d] %s:* %.3fus\n", child, class_to_str(class), t); + if (t > 20 * max) + igt_warn("[%d] Balancer submission %.1fx worse than normal!\n", child, t / max); gem_context_destroy(i915, execbuf.rsvd1); } |