[igt-dev] [Intel-gfx] [PATCH i-g-t] i915/gem_busy: Use a non-preemptible hanging batch

Mika Kuoppala mika.kuoppala at linux.intel.com
Wed Jan 2 13:03:34 UTC 2019


Chris Wilson <chris at chris-wilson.co.uk> writes:

> Ensure that the hangcheck notices the hanging batch by using a
> non-preemptible spin batch, as some future versions of hangcheck may
> allow a preemptible GPU hog to survive.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

Reviewed-by: Mika Kuoppala <mika.kuoppala at linux.intel.com>

> ---
>  tests/i915/gem_busy.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/tests/i915/gem_busy.c b/tests/i915/gem_busy.c
> index 76b44a5d4..eb3d3ef2b 100644
> --- a/tests/i915/gem_busy.c
> +++ b/tests/i915/gem_busy.c
> @@ -427,7 +427,10 @@ static bool has_extended_busy_ioctl(int fd)
>  
>  static void basic(int fd, unsigned ring, unsigned flags)
>  {
> -	igt_spin_t *spin = igt_spin_batch_new(fd, .engine = ring);
> +	igt_spin_t *spin =
> +		igt_spin_batch_new(fd,
> +				   .engine = ring,
> +				   .flags = IGT_SPIN_NO_PREEMPTION);
>  	struct timespec tv;
>  	int timeout;
>  	bool busy;
> -- 
> 2.20.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx


More information about the igt-dev mailing list