Re: [PATCH v3 0/1] mm: introduce put_user_page*(), placeholder versions

2019-03-18 Thread John Hubbard
On 3/14/19 2:06 AM, Jan Kara wrote: > On Wed 13-03-19 19:21:37, Christopher Lameter wrote: >> On Wed, 13 Mar 2019, Christoph Hellwig wrote: >> >>> On Wed, Mar 13, 2019 at 09:11:13AM +1100, Dave Chinner wrote: On Tue, Mar 12, 2019 at 03:39:33AM -0700, Ira Weiny wrote: > IMHO I don't think

Re: [PATCH v3 0/1] mm: introduce put_user_page*(), placeholder versions

2019-03-14 Thread John Hubbard
On 3/14/19 1:25 PM, William Kucharski wrote: On Mar 14, 2019, at 7:30 AM, Jan Kara wrote: Well I have some crash reports couple years old and they are not from QA departments. So I'm pretty confident there are real users that use this in production... and just reboot their machine in case

Re: [PATCH v3 0/1] mm: introduce put_user_page*(), placeholder versions

2019-03-14 Thread William Kucharski
> On Mar 14, 2019, at 7:30 AM, Jan Kara wrote: > > Well I have some crash reports couple years old and they are not from QA > departments. So I'm pretty confident there are real users that use this in > production... and just reboot their machine in case it crashes. Do you know what the use

Re: [PATCH v3 0/1] mm: introduce put_user_page*(), placeholder versions

2019-03-14 Thread Jan Kara
On Thu 14-03-19 09:57:18, Jason Gunthorpe wrote: > On Thu, Mar 14, 2019 at 10:03:45AM +0100, Jan Kara wrote: > > On Wed 13-03-19 19:16:51, Christopher Lameter wrote: > > > On Tue, 12 Mar 2019, Jerome Glisse wrote: > > > > > > > > > This has been discuss extensively already. GUP usage is now > >

Re: [PATCH v3 0/1] mm: introduce put_user_page*(), placeholder versions

2019-03-14 Thread Jason Gunthorpe
On Thu, Mar 14, 2019 at 10:03:45AM +0100, Jan Kara wrote: > On Wed 13-03-19 19:16:51, Christopher Lameter wrote: > > On Tue, 12 Mar 2019, Jerome Glisse wrote: > > > > > > > This has been discuss extensively already. GUP usage is now > > > > > widespread in > > > > > multiple drivers, removing

Re: [PATCH v3 0/1] mm: introduce put_user_page*(), placeholder versions

2019-03-14 Thread Jan Kara
On Wed 13-03-19 19:21:37, Christopher Lameter wrote: > On Wed, 13 Mar 2019, Christoph Hellwig wrote: > > > On Wed, Mar 13, 2019 at 09:11:13AM +1100, Dave Chinner wrote: > > > On Tue, Mar 12, 2019 at 03:39:33AM -0700, Ira Weiny wrote: > > > > IMHO I don't think that the copy_file_range() is going

Re: [PATCH v3 0/1] mm: introduce put_user_page*(), placeholder versions

2019-03-14 Thread Jan Kara
On Wed 13-03-19 19:16:51, Christopher Lameter wrote: > On Tue, 12 Mar 2019, Jerome Glisse wrote: > > > > > This has been discuss extensively already. GUP usage is now widespread > > > > in > > > > multiple drivers, removing that would regress userspace ie break > > > > existing > > > >

Re: [PATCH v3 0/1] mm: introduce put_user_page*(), placeholder versions

2019-03-13 Thread Jerome Glisse
On Wed, Mar 13, 2019 at 07:16:51PM +, Christopher Lameter wrote: > On Tue, 12 Mar 2019, Jerome Glisse wrote: > > > > > This has been discuss extensively already. GUP usage is now widespread > > > > in > > > > multiple drivers, removing that would regress userspace ie break > > > > existing

Re: [PATCH v3 0/1] mm: introduce put_user_page*(), placeholder versions

2019-03-13 Thread Christopher Lameter
On Wed, 13 Mar 2019, Christoph Hellwig wrote: > On Wed, Mar 13, 2019 at 09:11:13AM +1100, Dave Chinner wrote: > > On Tue, Mar 12, 2019 at 03:39:33AM -0700, Ira Weiny wrote: > > > IMHO I don't think that the copy_file_range() is going to carry us > > > through the > > > next wave of user

Re: [PATCH v3 0/1] mm: introduce put_user_page*(), placeholder versions

2019-03-13 Thread Christopher Lameter
On Tue, 12 Mar 2019, Jerome Glisse wrote: > > > This has been discuss extensively already. GUP usage is now widespread in > > > multiple drivers, removing that would regress userspace ie break existing > > > application. We all know what the rules for that is. You are still misstating the issue.

Re: [PATCH v3 0/1] mm: introduce put_user_page*(), placeholder versions

2019-03-13 Thread Christoph Hellwig
On Wed, Mar 13, 2019 at 09:11:13AM +1100, Dave Chinner wrote: > On Tue, Mar 12, 2019 at 03:39:33AM -0700, Ira Weiny wrote: > > IMHO I don't think that the copy_file_range() is going to carry us through > > the > > next wave of user performance requirements. RDMA, while the first, is not > > the

Re: [PATCH v3 0/1] mm: introduce put_user_page*(), placeholder versions

2019-03-12 Thread Ira Weiny
On Wed, Mar 13, 2019 at 09:11:13AM +1100, Dave Chinner wrote: > On Tue, Mar 12, 2019 at 03:39:33AM -0700, Ira Weiny wrote: > > IMHO I don't think that the copy_file_range() is going to carry us through > > the > > next wave of user performance requirements. RDMA, while the first, is not > > the

Re: [PATCH v3 0/1] mm: introduce put_user_page*(), placeholder versions

2019-03-12 Thread Dave Chinner
On Tue, Mar 12, 2019 at 03:39:33AM -0700, Ira Weiny wrote: > IMHO I don't think that the copy_file_range() is going to carry us through the > next wave of user performance requirements. RDMA, while the first, is not the > only technology which is looking to have direct access to files. XDP is >

Re: [PATCH v3 0/1] mm: introduce put_user_page*(), placeholder versions

2019-03-12 Thread Ira Weiny
On Tue, Mar 12, 2019 at 05:23:21AM +, Christopher Lameter wrote: > On Mon, 11 Mar 2019, Dave Chinner wrote: > > > > Direct IO on a mmapped file backed page doesnt make any sense. > > > > People have used it for many, many years as zero-copy data movement > > pattern. i.e. mmap the destination

Re: [PATCH v3 0/1] mm: introduce put_user_page*(), placeholder versions

2019-03-12 Thread Jason Gunthorpe
On Tue, Mar 12, 2019 at 11:35:29AM -0400, Jerome Glisse wrote: > > > > Yes you now have the filesystem as well as the GUP pinner claiming > > > > authority over the contents of a single memory segment. Maybe better not > > > > allow that? > > > > > > This goes back to regressing existing driver

Re: [PATCH v3 0/1] mm: introduce put_user_page*(), placeholder versions

2019-03-12 Thread Jerome Glisse
On Tue, Mar 12, 2019 at 04:52:07AM +, Christopher Lameter wrote: > On Fri, 8 Mar 2019, Jerome Glisse wrote: > > > > > > > It would good if that understanding would be enforced somehow given the > > > problems > > > that we see. > > > > This has been discuss extensively already. GUP usage is

Re: [PATCH v3 0/1] mm: introduce put_user_page*(), placeholder versions

2019-03-11 Thread Christopher Lameter
On Mon, 11 Mar 2019, Dave Chinner wrote: > > Direct IO on a mmapped file backed page doesnt make any sense. > > People have used it for many, many years as zero-copy data movement > pattern. i.e. mmap the destination file, use direct IO to DMA direct > into the destination file page cache pages,

Re: [PATCH v3 0/1] mm: introduce put_user_page*(), placeholder versions

2019-03-11 Thread Christopher Lameter
On Fri, 8 Mar 2019, Jerome Glisse wrote: > > > > It would good if that understanding would be enforced somehow given the > > problems > > that we see. > > This has been discuss extensively already. GUP usage is now widespread in > multiple drivers, removing that would regress userspace ie break

Re: [PATCH v3 0/1] mm: introduce put_user_page*(), placeholder versions

2019-03-10 Thread Dave Chinner
On Fri, Mar 08, 2019 at 03:08:40AM +, Christopher Lameter wrote: > On Wed, 6 Mar 2019, john.hubb...@gmail.com wrote: > > Direct IO > > = > > > > Direct IO can cause corruption, if userspace does Direct-IO that writes to > > a range of virtual addresses that are mmap'd to a file. The

Re: [PATCH v3 0/1] mm: introduce put_user_page*(), placeholder versions

2019-03-08 Thread Jerome Glisse
On Fri, Mar 08, 2019 at 03:08:40AM +, Christopher Lameter wrote: > On Wed, 6 Mar 2019, john.hubb...@gmail.com wrote: > > > > GUP was first introduced for Direct IO (O_DIRECT), allowing filesystem code > > to get the struct page behind a virtual address and to let storage hardware > > perform

Re: [PATCH v3 0/1] mm: introduce put_user_page*(), placeholder versions

2019-03-07 Thread Christopher Lameter
On Wed, 6 Mar 2019, john.hubb...@gmail.com wrote: > GUP was first introduced for Direct IO (O_DIRECT), allowing filesystem code > to get the struct page behind a virtual address and to let storage hardware > perform a direct copy to or from that page. This is a short-lived access > pattern, and

Re: [PATCH v3 0/1] mm: introduce put_user_page*(), placeholder versions

2019-03-07 Thread Ira Weiny
On Wed, Mar 06, 2019 at 03:54:54PM -0800, john.hubb...@gmail.com wrote: > From: John Hubbard > > Hi Andrew and all, > > Can we please apply this (destined for 5.2) once the time is right? > (I see that -mm just got merged into the main tree today.) > > We seem to have pretty solid consensus on

[PATCH v3 0/1] mm: introduce put_user_page*(), placeholder versions

2019-03-06 Thread john . hubbard
From: John Hubbard Hi Andrew and all, Can we please apply this (destined for 5.2) once the time is right? (I see that -mm just got merged into the main tree today.) We seem to have pretty solid consensus on the concept and details of the put_user_pages() approach. Or at least, if we don't,