igt: Repalce drv_missed_irq_hang script with a C-equivalent
PATCH 1/1 igt: Repalce drv_missed_irq_hang script with a C-equivalent
In order to control some of the finer detail of detecting when we missed an interrupt, replace the shell script with C.
This version submits a hanging batch and uses a child process to unhang it, whilst the parent sleeps. As the child process is prevented from running whilst the parent is alive (as the child is a low priority normal process whereas the parent is a RT process), the child can only unhang the parent after i915_wait_request() has spun up and tried to enable the interrupt. In contrast, the shell script guessed a workload that should take long enough for the i915_spin_request() to miss the completion, but that was not guaranteed.
A minor convenience of the C version is that we don't have to worry about install paths to find the binaries underneath.
--- tests/Makefile.sources | 1 + tests/drv_missed_irq.c | 170 ++++++++++++++++++++++++++++++++++++++++++++++ tests/drv_missed_irq_hang | 80 ---------------------- 3 files changed, 171 insertions(+), 80 deletions(-) create mode 100644 tests/drv_missed_irq.c delete mode 100755 tests/drv_missed_irq_hang
tests/Makefile.sources +1 -0
@@ -142,6 +142,7 @@ TESTS_progs = \ drm_vma_limiter_cached \ drm_vma_limiter_cpu \ drm_vma_limiter_gtt \ + drv_missed_irq \ gem_bad_length \ gem_cpu_reloc \ gem_cs_prefetch \
tests/drv_missed_irq.c new file +170 -0
170 lines not on this page · raw message
tests/drv_missed_irq_hang deleted +0 -80
80 lines not on this page · raw message
Signature · 6 lines
2.8.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx