[Intel-gfx] [PATCH 02/16] drm/i915: Convert non-blocking waits for requests over to using RCU
Chris Wilson
chris at chris-wilson.co.uk
Wed Aug 3 13:36:19 UTC 2016
On Wed, Aug 03, 2016 at 04:23:16PM +0300, Joonas Lahtinen wrote:
> On ma, 2016-08-01 at 19:22 +0100, Chris Wilson wrote:
> > /**
> > @@ -1647,6 +1629,15 @@ int i915_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
> > int ret = 0;
> > bool write = !!(vmf->flags & FAULT_FLAG_WRITE);
> >
> > + /* Try to flush the object off the GPU first without holding the lock.
> > + * Upon acquiring the lock, we will perform our sanity checks and then
> > + * repeat the flush holding the lock in the normal manner to catch cases
> > + * where we are gazumped.
> > + */
> > + ret = __unsafe_wait_rendering(obj, NULL, !write);
> > + if (ret)
> > + goto err;
> > +
>
> Why do you lift this call super early, tracing will be affected at
> least.
I was moving it out of the rpm_get, since we don't need to be inside that
runtime barrier. (That rpm get is very interesting btw, but that's for
later!)
The trace can be moved as well.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list