Re: [PATCH igt] igt/gem_eio: Add another variant of in-flight to avoid request coalescing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Michał Winiarski (2017-09-15 17:47:27)
> On Fri, Sep 15, 2017 at 05:10:25PM +0100, Chris Wilson wrote:
> > Break up request coalescing by submitting a queue of requests from
> > different contexts. This makes sure that we mark all ready but not yet
> > submitted-to-hw requests as completed/EIO upon wedging.
> > 
> > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > Cc: Michał Winiarski <michal.winiarski@xxxxxxxxx>
> > ---
> >  tests/gem_eio.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 72 insertions(+)
> > 
> > diff --git a/tests/gem_eio.c b/tests/gem_eio.c
> > index 0fa98032..608b2dfd 100644
> > --- a/tests/gem_eio.c
> > +++ b/tests/gem_eio.c
> > @@ -207,6 +207,75 @@ static void test_inflight(int fd)
> >       }
> >  }
> >  
> > +static uint32_t __gem_context_create(int fd)
> > +{
> > +     struct drm_i915_gem_context_create create;
> > +
> > +     memset(&create, 0, sizeof(create));
> > +     if (ioctl(fd, DRM_IOCTL_I915_GEM_CONTEXT_CREATE, &create))
> > +             return 0;
> > +
> > +     return create.ctx_id;
> > +}
> > +
> 
> #define NCTX 64 since we're using it for both fences and ctx?
> 
> > +static void test_inflight_contexts(int fd)
> > +{
> > +     struct drm_i915_gem_execbuffer2 execbuf;
> > +     struct drm_i915_gem_exec_object2 obj[2];
> > +     uint32_t bbe = MI_BATCH_BUFFER_END;
> > +     unsigned int engine;
> > +     uint32_t ctx[64];
> > +     int fence[64];
> > +
> > +     igt_require(gem_has_exec_fence(fd));
> > +
> > +     ctx[0] = __gem_context_create(fd);
> 
> gem_context_create skips when we don't have contexts, so I think we can drop
> this.

It's horrible behaviour as it spams the debug logs, I wish it didn't.
> 
> /* We're using multiple contexts hoping that at least some of the requests are
>  * kept queued rather than submitted to the HW.
>  */
> 
> Or rephrased. Helpful to know what we're trying to achieve here without digging
> through git.

What I really want is some magic tool to autogenerate all the
permutations to exercise the different paths from the ABI entry through
the driver. Clearly I suck at remembering all the different
combinations. I keep trying with kcov_afl, but I have to stumble upon
the magical incarnation to make it dwim (quickly and exhaustively).
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux