[PATCH] mm: extend prefault helpers to fault in more than PAGE_SIZE

2012-04-13 Thread Geert Uytterhoeven
On Thu, Mar 1, 2012 at 20:22, Daniel Vetter wrote: > +/* Multipage variants of the above prefault helpers, useful if more than > + * PAGE_SIZE of date needs to be prefaulted. These are separate from the > above > + * functions (which only handle up to PAGE_SIZE) to avoid clobbering the > + *

Re: [PATCH] mm: extend prefault helpers to fault in more than PAGE_SIZE

2012-04-13 Thread Geert Uytterhoeven
On Thu, Mar 1, 2012 at 20:22, Daniel Vetter daniel.vet...@ffwll.ch wrote: +/* Multipage variants of the above prefault helpers, useful if more than + * PAGE_SIZE of date needs to be prefaulted. These are separate from the above + * functions (which only handle up to PAGE_SIZE) to avoid

[PATCH] mm: extend prefault helpers to fault in more than PAGE_SIZE

2012-03-27 Thread Daniel Vetter
On Thu, Mar 01, 2012 at 12:15:57PM -0800, Andrew Morton wrote: > On Thu, 1 Mar 2012 20:22:59 +0100 > Daniel Vetter wrote: > > > drm/i915 wants to read/write more than one page in its fastpath > > and hence needs to prefault more than PAGE_SIZE bytes. > > > > Add new functions in filemap.h to

[PATCH] mm: extend prefault helpers to fault in more than PAGE_SIZE

2012-03-01 Thread Daniel Vetter
drm/i915 wants to read/write more than one page in its fastpath and hence needs to prefault more than PAGE_SIZE bytes. Add new functions in filemap.h to make that possible. Also kill a copy spurious space in both functions while at it. v2: As suggested by Andrew Morton, add a multipage

[PATCH] mm: extend prefault helpers to fault in more than PAGE_SIZE

2012-03-01 Thread Andrew Morton
On Thu, 1 Mar 2012 20:22:59 +0100 Daniel Vetter wrote: > drm/i915 wants to read/write more than one page in its fastpath > and hence needs to prefault more than PAGE_SIZE bytes. > > Add new functions in filemap.h to make that possible. > > Also kill a copy spurious space in both functions

[PATCH] mm: extend prefault helpers to fault in more than PAGE_SIZE

2012-03-01 Thread Daniel Vetter
On Wed, Feb 29, 2012 at 03:01:46PM -0800, Andrew Morton wrote: > On Wed, 29 Feb 2012 15:03:31 +0100 > Daniel Vetter wrote: > > > drm/i915 wants to read/write more than one page in its fastpath > > and hence needs to prefault more than PAGE_SIZE bytes. > > > > I've checked the callsites and they

[PATCH] mm: extend prefault helpers to fault in more than PAGE_SIZE

2012-03-01 Thread Daniel Vetter
drm/i915 wants to read/write more than one page in its fastpath and hence needs to prefault more than PAGE_SIZE bytes. Add new functions in filemap.h to make that possible. Also kill a copypasted spurious space in both functions while at it. v2: As suggested by Andrew Morton, add a multipage

Re: [PATCH] mm: extend prefault helpers to fault in more than PAGE_SIZE

2012-03-01 Thread Andrew Morton
On Thu, 1 Mar 2012 20:22:59 +0100 Daniel Vetter daniel.vet...@ffwll.ch wrote: drm/i915 wants to read/write more than one page in its fastpath and hence needs to prefault more than PAGE_SIZE bytes. Add new functions in filemap.h to make that possible. Also kill a copypasted spurious space

[PATCH] mm: extend prefault helpers to fault in more than PAGE_SIZE

2012-02-29 Thread Andrew Morton
On Thu, 1 Mar 2012 00:14:53 +0100 Daniel Vetter wrote: > I'll redo this patch by adding _multipage versions of these 2 functions > for i915. OK, but I hope "for i915" doesn't mean "private to"! Put 'em in pagemap.h, for maintenance reasons and because they are generic. Making them inline is a

[PATCH] mm: extend prefault helpers to fault in more than PAGE_SIZE

2012-02-29 Thread Daniel Vetter
drm/i915 wants to read/write more than one page in its fastpath and hence needs to prefault more than PAGE_SIZE bytes. I've checked the callsites and they all already clamp size when calling fault_in_pages_* to the same as for the subsequent __copy_to|from_user and hence don't rely on the

[PATCH] mm: extend prefault helpers to fault in more than PAGE_SIZE

2012-02-29 Thread Andrew Morton
On Wed, 29 Feb 2012 15:03:31 +0100 Daniel Vetter wrote: > drm/i915 wants to read/write more than one page in its fastpath > and hence needs to prefault more than PAGE_SIZE bytes. > > I've checked the callsites and they all already clamp size when > calling fault_in_pages_* to the same as for

[PATCH] mm: extend prefault helpers to fault in more than PAGE_SIZE

2012-02-29 Thread Daniel Vetter
drm/i915 wants to read/write more than one page in its fastpath and hence needs to prefault more than PAGE_SIZE bytes. I've checked the callsites and they all already clamp size when calling fault_in_pages_* to the same as for the subsequent __copy_to|from_user and hence don't rely on the

Re: [PATCH] mm: extend prefault helpers to fault in more than PAGE_SIZE

2012-02-29 Thread Andrew Morton
On Wed, 29 Feb 2012 15:03:31 +0100 Daniel Vetter daniel.vet...@ffwll.ch wrote: drm/i915 wants to read/write more than one page in its fastpath and hence needs to prefault more than PAGE_SIZE bytes. I've checked the callsites and they all already clamp size when calling fault_in_pages_* to

Re: [PATCH] mm: extend prefault helpers to fault in more than PAGE_SIZE

2012-02-29 Thread Daniel Vetter
On Wed, Feb 29, 2012 at 03:01:46PM -0800, Andrew Morton wrote: On Wed, 29 Feb 2012 15:03:31 +0100 Daniel Vetter daniel.vet...@ffwll.ch wrote: drm/i915 wants to read/write more than one page in its fastpath and hence needs to prefault more than PAGE_SIZE bytes. I've checked the

Re: [PATCH] mm: extend prefault helpers to fault in more than PAGE_SIZE

2012-02-29 Thread Andrew Morton
On Thu, 1 Mar 2012 00:14:53 +0100 Daniel Vetter dan...@ffwll.ch wrote: I'll redo this patch by adding _multipage versions of these 2 functions for i915. OK, but I hope for i915 doesn't mean private to! Put 'em in pagemap.h, for maintenance reasons and because they are generic. Making them

[PATCH] mm: extend prefault helpers to fault in more than PAGE_SIZE

2012-02-24 Thread Daniel Vetter
On Thu, Feb 23, 2012 at 02:36:58PM -0800, Andrew Morton wrote: > On Thu, 16 Feb 2012 13:01:36 +0100 > Daniel Vetter wrote: > > > drm/i915 wants to read/write more than one page in its fastpath > > and hence needs to prefault more than PAGE_SIZE bytes. > > > > I've checked the callsites and they

[PATCH] mm: extend prefault helpers to fault in more than PAGE_SIZE

2012-02-24 Thread Andrew Morton
On Fri, 24 Feb 2012 14:34:31 +0100 Daniel Vetter wrote: > > > --- a/include/linux/pagemap.h > > > +++ b/include/linux/pagemap.h > > > @@ -408,6 +408,7 @@ extern void add_page_wait_queue(struct page *page, > > > wait_queue_t *waiter); > > > static inline int fault_in_pages_writeable(char __user

Re: [PATCH] mm: extend prefault helpers to fault in more than PAGE_SIZE

2012-02-24 Thread Daniel Vetter
On Thu, Feb 23, 2012 at 02:36:58PM -0800, Andrew Morton wrote: On Thu, 16 Feb 2012 13:01:36 +0100 Daniel Vetter daniel.vet...@ffwll.ch wrote: drm/i915 wants to read/write more than one page in its fastpath and hence needs to prefault more than PAGE_SIZE bytes. I've checked the

Re: [PATCH] mm: extend prefault helpers to fault in more than PAGE_SIZE

2012-02-24 Thread Andrew Morton
On Fri, 24 Feb 2012 14:34:31 +0100 Daniel Vetter dan...@ffwll.ch wrote: --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -408,6 +408,7 @@ extern void add_page_wait_queue(struct page *page, wait_queue_t *waiter); static inline int fault_in_pages_writeable(char __user

[PATCH] mm: extend prefault helpers to fault in more than PAGE_SIZE

2012-02-23 Thread Andrew Morton
On Thu, 16 Feb 2012 13:01:36 +0100 Daniel Vetter wrote: > drm/i915 wants to read/write more than one page in its fastpath > and hence needs to prefault more than PAGE_SIZE bytes. > > I've checked the callsites and they all already clamp size when > calling fault_in_pages_* to the same as for

Re: [PATCH] mm: extend prefault helpers to fault in more than PAGE_SIZE

2012-02-23 Thread Andrew Morton
On Thu, 16 Feb 2012 13:01:36 +0100 Daniel Vetter daniel.vet...@ffwll.ch wrote: drm/i915 wants to read/write more than one page in its fastpath and hence needs to prefault more than PAGE_SIZE bytes. I've checked the callsites and they all already clamp size when calling fault_in_pages_* to

[PATCH] mm: extend prefault helpers to fault in more than PAGE_SIZE

2012-02-16 Thread Hillf Danton
On Thu, Feb 16, 2012 at 8:01 PM, Daniel Vetter wrote: > @@ -416,17 +417,20 @@ static inline int fault_in_pages_writeable(char __user > *uaddr, int size) > ? ? ? ? * Writing zeroes into userspace here is OK, because we know that if > ? ? ? ? * the zero gets there, we'll be overwriting it. > ? ?

[PATCH] mm: extend prefault helpers to fault in more than PAGE_SIZE

2012-02-16 Thread Daniel Vetter
On Thu, Feb 16, 2012 at 09:32:08PM +0800, Hillf Danton wrote: > On Thu, Feb 16, 2012 at 8:01 PM, Daniel Vetter > wrote: > > @@ -416,17 +417,20 @@ static inline int fault_in_pages_writeable(char > > __user *uaddr, int size) > > ? ? ? ? * Writing zeroes into userspace here is OK, because we know

[PATCH] mm: extend prefault helpers to fault in more than PAGE_SIZE

2012-02-16 Thread Daniel Vetter
drm/i915 wants to read/write more than one page in its fastpath and hence needs to prefault more than PAGE_SIZE bytes. I've checked the callsites and they all already clamp size when calling fault_in_pages_* to the same as for the subsequent __copy_to|from_user and hence don't rely on the

[PATCH] mm: extend prefault helpers to fault in more than PAGE_SIZE

2012-02-16 Thread Daniel Vetter
drm/i915 wants to read/write more than one page in its fastpath and hence needs to prefault more than PAGE_SIZE bytes. I've checked the callsites and they all already clamp size when calling fault_in_pages_* to the same as for the subsequent __copy_to|from_user and hence don't rely on the

Re: [PATCH] mm: extend prefault helpers to fault in more than PAGE_SIZE

2012-02-16 Thread Daniel Vetter
On Thu, Feb 16, 2012 at 09:32:08PM +0800, Hillf Danton wrote: On Thu, Feb 16, 2012 at 8:01 PM, Daniel Vetter daniel.vet...@ffwll.ch wrote: @@ -416,17 +417,20 @@ static inline int fault_in_pages_writeable(char __user *uaddr, int size)         * Writing zeroes into userspace here is OK,

Re: [PATCH] mm: extend prefault helpers to fault in more than PAGE_SIZE

2012-02-16 Thread Hillf Danton
On Thu, Feb 16, 2012 at 8:01 PM, Daniel Vetter daniel.vet...@ffwll.ch wrote: @@ -416,17 +417,20 @@ static inline int fault_in_pages_writeable(char __user *uaddr, int size)         * Writing zeroes into userspace here is OK, because we know that if         * the zero gets there, we'll be