Re: [PATCH 12/15] drm/i915: Wait upon userptr get-user-pages within execbuffer

Chris Wilson
2017-02-24T14:23:56Z

On Fri, Feb 24, 2017 at 02:53:07PM +0100, Michał Winiarski wrote:
> On Thu, Feb 23, 2017 at 04:18:27PM +0000, Chris Wilson wrote:
> > This simply hides the EAGAIN caused by userptr when userspace causes
> > resource contention. However, it is quite beneficial with highly
> > contended userptr users as we avoid repeating the setup costs and
> > kernel-user context switches.
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>
> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>

Michał pointed out in irc that we need to hit the slowpath after failing
to pin the userptr pages in the earlier reservation phase even if we
have no relocation (flushing the wq inside the kernel is nicer than
spinning on EAGAIN). (Hmm, with the exception that flush_workqueue is
not interruptible. Hmm. I think this would be worth refining later to be
an interruptible flush on the right set of userptr.) Anway, just to say
that required changes to the preceding patch not to miss the slowpath on
reservation failure.
-Chris

--
Chris Wilson, Intel Open Source Technology Centre