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

From: Keith Packard
Date: Thu Nov 03 2011 - 17:07:11 EST


On Mon, 24 Oct 2011 00:11:57 +0200, Daniel Vetter <daniel@xxxxxxxx> 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@xxxxxxxxx

Attachment: pgp00000.pgp
Description: PGP signature