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

Keith Packard keithp at keithp.com
Thu Nov 3 22:06:55 CET 2011


On Mon, 24 Oct 2011 00:11:57 +0200, Daniel Vetter <daniel at ffwll.ch> wrote:

> This patch only fixes things up so that we prefault the entire page range
> and not just the first PAGE_SIZE bytes (i.e. at most 2 pages). So I don't
> see the risk of extending the current behaviour to all pages. Userspace
> can already see these zero writes, but only when doing something stupid.

When we posted a patch to instead fix fault_in_pages_writeable, Andrew
complained that we'd have modified memory even on a short read, which
wasn't considered polite. Could we read/write the same value and avoid
that problem?

Also, we should be fixing fault_in_pages_* going forward, rather than
kludging in more code. And, we'd get to remove the version in ntfs,
which should end in a patch that removes more code than it adds...

-- 
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/20111103/5547ffc6/attachment.sig>


More information about the Intel-gfx mailing list