[Intel-gfx] [PATCH 2/2] drm/i915: properly prefault for pread/pwrite

Keith Packard keithp at keithp.com
Fri Nov 18 18:42:42 CET 2011


On Fri, 18 Nov 2011 10:12:38 +0100, Daniel Vetter <daniel.vetter at ffwll.ch> wrote:

> We want to prefault the last byte if the pfn of the last prefault
> address doesn't match the pfn of the last byte of the userspace
> address range. Only happens when userspace hands in badly aligned
> address, not every time. I've rechecked and I think the code actually
> does what I want it to do.

Sorry, I was confused by PAGE_MASK (again); assumed it was 0xfff instead
of ~0xfff.

> Chris was despised at the lack of beauty of the code and I agree. Due
> to the ppgtt trip to Poland I haven't gotten around to do it actually.
> Actually I've just noticed that this is might be the old pwrite/pread
> series (mail here still sucks). The new one fixes up the prefault
> helpers in pagemap.h (instead of reinventing the wheel for i915.ko),
> but they have the same issue of profound ugliness.

Right, that was in a different mail thread and is still awaiting
cleanups it seems. Sounds like you're having adventures in Poland at
least. I'll pend this until you've gotten it finished and ready to
merge.

--
keith.packard at intel.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20111118/815e6463/attachment.sig>


More information about the Intel-gfx mailing list