[Intel-gfx] [PATCH] drm/i915: Handle concurrent GTT faults gracefully

Daniel Vetter daniel at ffwll.ch
Fri Jun 13 16:40:50 CEST 2014


On Fri, Jun 13, 2014 at 07:17:06AM -0700, Volkin, Bradley D wrote:
> On Thu, Jun 12, 2014 at 06:36:04PM +0100, Chris Wilson wrote:
> > On Thu, Jun 12, 2014 at 10:10:58AM -0700, Volkin, Bradley D wrote:
> > > On Thu, Jun 12, 2014 at 03:13:14PM +0100, Chris Wilson wrote:
> > > > +	/* Check if a second thread completed the prefaulting for us */
> > > > +	if (obj->fault_mappable && pte_exists(vma, vma->vm_start))
> > > > +		goto unlock;
> > > > +
> > > 
> > > We only set fault_mappable if we successfully remapped the whole range and clear
> > > it on unmapping the whole range, so do we need the additional pte_exists() check?
> > 
> > Yes. You have you have to consider that we can have multiple vma
> > pointing to the same object. See i-g-t/gem_mmap_gtt/read-write-distinct.
> > -Chris
> 
> Ah, I missed the protection bits as a reason for a second mapping.
> Makes sense though.
> 
> Reviewed-by: Brad Volkin <bradley.d.volkin at intel.com>

Queued for -next, thanks for the patch.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list