[Intel-gfx] [PATCH 2/2] drm/i915: properly prefault for pread/pwrite
keithp at keithp.com
Fri Nov 18 09:42:42 PST 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
> 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
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 827 bytes
Desc: not available
More information about the Intel-gfx