[Intel-gfx] [PATCH 2/2] drm/i915: Disable page-faults around the fast pwrite/pread paths

Keith Packard keithp at keithp.com
Sat Jul 9 23:06:23 CEST 2011


On Sat, 09 Jul 2011 21:50:26 +0100, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> 
> I think would do, find_vma() is not necessary cheap though, and there are a
> couple of optimisations that we haven't done for pwrite/pread yet to speed
> up the transition to the slow path.

Yeah, find_vma is a rb tree walk over the whole address space. Yikes!
And, of course, we'd actually need to walk over the whole mapping in
case the application managed to walk from non-GTT space into GTT space.

> The current code generates lockdep OOPSes and inconsistently applies
> pagefault_disable along some paths, in particular for 32-bit kernels,
> but not others. And the abuse is permitted through the OpenGL
> specification, I believe. The offending app is just doing
> glBufferData(glMapBuffer()), iiuc;

Sure, it's permitted, so ideally we'd detect this abuse and fall back to
the slow path, but we need a cheap check which takes the slow path,
perhaps pessimistically.

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20110709/564dca23/attachment.sig>


More information about the Intel-gfx mailing list