[Intel-gfx] [PATCH 3/3] drm/i915/userptr: Probe vma range before gup

Chris Wilson chris at chris-wilson.co.uk
Tue Jan 15 11:59:03 UTC 2019


Quoting Tvrtko Ursulin (2019-01-15 10:40:24)
> 
> On 15/01/2019 10:30, Chris Wilson wrote:
> > Quoting Tvrtko Ursulin (2019-01-15 10:19:11)
> >>
> >> On 14/01/2019 21:17, Chris Wilson wrote:
> >>> @@ -620,40 +682,24 @@ static int i915_gem_userptr_get_pages(struct drm_i915_gem_object *obj)
> >>>                        return -EAGAIN;
> >>>        }
> >>>    
> >>> -     pvec = NULL;
> >>> -     pinned = 0;
> >>> +     if (mm == current->mm && try_fast_gup(obj) == 0)
> >>> +             return 0;
> >>
> >> Is try_fast_gup guaranteed to fail on ranges probe_range would have
> >> rejected?
> > 
> > If a page isn't present, it will fail. For our purposes that means
> > fast_gup fails for GGTT mmaps, as well as other ranges.
> 
> What if it has been pre-faulted?

It will still not have a struct page :)
-Chris


More information about the Intel-gfx mailing list