[i-g-t] i915/gem_mmap_gtt: Impose a timeout for "hang"

Submitted by Chris Wilson on Feb. 12, 2019, 10:16 a.m.

Details

Message ID 20190212101601.25562-1-chris@chris-wilson.co.uk
State Accepted
Commit ed32029e6a630d9322bd544b626eea38b4785e68
Headers show
Series "i915/gem_mmap_gtt: Impose a timeout for "hang"" ( rev: 1 ) in IGT

Not browsing as part of any series.

Commit Message

Chris Wilson Feb. 12, 2019, 10:16 a.m.
Only wait a maximum of 2 more seconds for the hang children to complete,
to catch deadlocks in a timely fashion.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
---
 tests/i915/gem_mmap_gtt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/tests/i915/gem_mmap_gtt.c b/tests/i915/gem_mmap_gtt.c
index f9d811ad6..f6fbbe193 100644
--- a/tests/i915/gem_mmap_gtt.c
+++ b/tests/i915/gem_mmap_gtt.c
@@ -450,7 +450,7 @@  test_hang(int fd)
 	igt_info("%lu resets\n", count);
 
 	control->done = true;
-	igt_waitchildren();
+	igt_waitchildren_timeout(2, NULL);
 
 	igt_assert(!control->error);
 	munmap(control, 4096);

Comments

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

> Only wait a maximum of 2 more seconds for the hang children to complete,
> to catch deadlocks in a timely fashion.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>
> ---
>  tests/i915/gem_mmap_gtt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/i915/gem_mmap_gtt.c b/tests/i915/gem_mmap_gtt.c
> index f9d811ad6..f6fbbe193 100644
> --- a/tests/i915/gem_mmap_gtt.c
> +++ b/tests/i915/gem_mmap_gtt.c
> @@ -450,7 +450,7 @@ test_hang(int fd)
>  	igt_info("%lu resets\n", count);
>  
>  	control->done = true;
> -	igt_waitchildren();
> +	igt_waitchildren_timeout(2, NULL);

Seems that no-one is using the reason argument. You could have
been the first ever!

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

>  
>  	igt_assert(!control->error);
>  	munmap(control, 4096);
> -- 
> 2.20.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Mika Kuoppala (2019-02-12 10:56:13)
> Chris Wilson <chris@chris-wilson.co.uk> writes:
> 
> > Only wait a maximum of 2 more seconds for the hang children to complete,
> > to catch deadlocks in a timely fashion.
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Mika Kuoppala <mika.kuoppala@intel.com>
> > ---
> >  tests/i915/gem_mmap_gtt.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tests/i915/gem_mmap_gtt.c b/tests/i915/gem_mmap_gtt.c
> > index f9d811ad6..f6fbbe193 100644
> > --- a/tests/i915/gem_mmap_gtt.c
> > +++ b/tests/i915/gem_mmap_gtt.c
> > @@ -450,7 +450,7 @@ test_hang(int fd)
> >       igt_info("%lu resets\n", count);
> >  
> >       control->done = true;
> > -     igt_waitchildren();
> > +     igt_waitchildren_timeout(2, NULL);
> 
> Seems that no-one is using the reason argument. You could have
> been the first ever!

I resisted because I suggested Daniel could remove it as he's
overhauling igt_waitchildren_timeout().
-Chris