[Mesa-dev] [PATCH 4/4] i965: Drop the batch and limp along if execbuf fails.

Chris Wilson chris at chris-wilson.co.uk
Mon Sep 25 16:53:37 UTC 2017


Quoting Kenneth Graunke (2017-09-25 17:46:11)
> On Monday, September 25, 2017 8:05:29 AM PDT Chris Wilson wrote:
> > Quoting Jason Ekstrand (2017-09-24 22:53:04)
> > > I've got this a few times recently and it's really annoying.  I don't know 
> > > if this will fix anything or not but it may be worth a go.  I fear, 
> > > however, that ignoring an execbuf failure will lead to permanently 
> > > corrupted rendering or even additional hangs due to a chunk of the stream 
> > > being missing.  That seems undesirable.  I would feel more comfortable 
> > > about if you flagged BRW_NEW_CONTEXT in this cases to force a full state 
> > > re-emit.
> > 
> > The other step to consider is dependency chains. If you replace the
> > batch with an empty one (just MI_BB_END) and execute it with the rest of
> > the execobjects, then all the fences (both implicit and explicit) will
> > be valid. Just the contents garbage, and gpu state can be fixed up by
> > NEW_CONTEXT as Jason suggested.
> > -Chris
> 
> That seems like a good idea.  What do you think we should do if that
> fails?  I guess it would still try to pin all the execobject BOs, so
> couldn't it still hit a low memory problem and fail?

At that point, I suggest crawling into a corner and hiding under a
blanket. If the nop batch fails, then you know the system is under too
much pressure to continue -- tell the client to switch to using a GTT
mmap to write their last wishes. I don't think pulling the plug is the
answer, report the error and let the client sort it out (or they ignore
it and either get killed by the kernel, or it just works after a while).
-Chris


More information about the mesa-dev mailing list