[Intel-gfx] [PATCH 1/2] drm/i915: Prefault all pages for pread and pwrite

Chris Wilson chris at chris-wilson.co.uk
Sat Jul 9 22:31:17 CEST 2011


On Sat, 09 Jul 2011 13:21:48 -0700, Keith Packard <keithp at keithp.com> wrote:
> On Sat,  9 Jul 2011 09:38:50 +0100, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> 
> > +static int prefault_writeable(unsigned long uaddr, unsigned long len)
> 
> > +static int prefault_readable(unsigned long uaddr, unsigned long len)
> 
> These seems like a functions which belongs alongside (or in place of) the
> existing fault_in_pages_writable and fault_in_pages_readable functions.
> 
> I think, in fact, that one could convincingly argue that the existing
> functions are misleadingly named (or just broken).

I agree that I was indeed misled by the description of those two functions!

However, I don't like why this appears to fix the issue of get_user_pages()
failing on the non-prefaulted address.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list