diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2018-05-30 10:57:27 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-05-31 17:49:56 +0100 |
commit | 94411f9b9fffe4dd875dfaa0a0a2172083179572 (patch) | |
tree | 6db3905f1f5a0fc20c6ecea2e000b2f4d4a66e33 /lib/i915 | |
parent | fadf6e48639131c36708732a317dad1851583622 (diff) |
lib: Align ring measurement to timer
After hitting the SIGINT from execbuf, wait until the next timer signal
before trying again. This aligns the start of the ioctl to the timer,
hopefully maximising the amount of time we have for processing before
the next signal -- trying to prevent the case where we are scheduled out
in the middle of processing and so hit the timer signal too early.
References: https://bugs.freedesktop.org/show_bug.cgi?id=106695
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Antonio Argenziano <antonio.argenziano@intel.com>
Diffstat (limited to 'lib/i915')
-rw-r--r-- | lib/i915/gem_ring.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/i915/gem_ring.c b/lib/i915/gem_ring.c index 7d64165e..0c061000 100644 --- a/lib/i915/gem_ring.c +++ b/lib/i915/gem_ring.c @@ -96,6 +96,8 @@ __gem_measure_ring_inflight(int fd, unsigned int engine, enum measure_ring_flags if (last == count) break; + /* sleep until the next timer interrupt (woken on signal) */ + pause(); last = count; } while (1); |