Re: [Intel-gfx] [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 ma

Re: [Intel-gfx] [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&pasted spurious space in both functio

[Intel-gfx] [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&pasted spurious space in both functions while at it. v2: As suggested by Andrew Morton, add a multipage pa

Re: [Intel-gfx] [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

Re: [Intel-gfx] [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 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

Re: [Intel-gfx] [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 the

[Intel-gfx] [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 implicit

Re: [Intel-gfx] [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: [Intel-gfx] [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

Re: [Intel-gfx] [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 the

Re: [Intel-gfx] [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 that

[Intel-gfx] [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 implicit