Re: [PATCH 02/10] drm/i915/userptr: Make gup errors stickier

Chris Wilson
2016-08-15T15:28:43Z

On Mon, Aug 15, 2016 at 06:08:21PM +0300, Mika Kuoppala wrote:
> Chris Wilson <chris@chris-wilson.co.uk> writes:
>
> > + if (obj->userptr.work) {
> > /* active flag should still be held for the pending work */
> > - return -EAGAIN;
> > + if (IS_ERR(obj->userptr.work))
> > + return PTR_ERR(obj->userptr.work);
>
> Previously you did set the work to null before returning error,
> now you dont.
>
> Is it the responsibility of cancel_userptr now, through mm notifier,
> that clears the pointer?

Yes.

> > Keep any error reported by the gup_worker until we are notified that the
> > arena has changed (via the mmu-notifier). This has the importance of
> > making two consecutive calls to i915_gem_object_get_pages() reporting
> > the same error, and curtailing a loop of detecting a fault and requeueing
> > a gup_worker.

-Chris

--
Chris Wilson, Intel Open Source Technology Centre