[igt-dev] [Intel-gfx] [PATCH i-g-t 2/3] lib: Align ring measurement to timer
Antonio Argenziano
antonio.argenziano at intel.com
Wed May 30 17:30:36 UTC 2018
On 30/05/18 03:33, Chris Wilson wrote:
> 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 at chris-wilson.co.uk>
Not sure I understand what is the sequence of events, is the problem we
get a signal in the middle of a 'good' execbuf and exit the while loop
prematurely? If so maybe we can also think of making the timer 'VIRTUAL'
so that it would decrement only when the process is executing.
Thanks,
Antonio
> ---
> lib/i915/gem_ring.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/lib/i915/gem_ring.c b/lib/i915/gem_ring.c
> index 7d64165eb..0c061000c 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();
Does it cause any (sensible) slowdown?
Thanks,
Antonio
> last = count;
> } while (1);
>
>
More information about the igt-dev
mailing list