[Intel-gfx] [PATCH] drm/i915: Make vm eviction uninterruptible
Chris Wilson
chris at chris-wilson.co.uk
Mon Apr 7 11:42:56 CEST 2014
On Sun, Apr 06, 2014 at 11:35:03AM -0700, Ben Widawsky wrote:
> On Sat, Apr 05, 2014 at 07:45:28PM -0700, Ben Widawsky wrote:
> > The issue I was seeing appeared to seeing from sigkill. In such a case,
> > the process may want to die before the context/work/address space is
> > freeable. For example:
> > 1. evict_vm called for whatever reason
> > 2. wait_seqno because the VMA is still active
>
> hmm something isn't right here. Why did I get to wait_seqno if pin_count
> was 0? Just FYI, this wasn't hypothetical. I did trace it all the way to
> exactly ERESTARTSYS from wait_seqno.
>
> By the way, another option in evict would be:
> while(ret = (i915_vma_unbind(vma) == -ERESTARTSYS));
> WARN_ON(ret);
>
> > 3. receive signal break out of wait_seqno
> > 4. return to evict_vm and the above WARN
> >
> > Our error handling from there just spirals.
> >
> > One issue I have with our current code is I'd really like eviction to
> > not be able to fail (obviously extreme cases are unavoidable).
This is unrealistic since we must support X which uses sigtimer.
> > Perhaps
> > one other solution would be to make sure the context is idled before
> > evicting its VM.
Indeed.
Anyway, I do concur that wrapping i915_driver_preclose() with
dev_priv->mm.interruptible = false;
would make us both happy.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list