Re: [PATCH 2/2] vmsplice: Add limited zero copy to vmsplice

2013-10-17 Thread Robert Jennings
* Vlastimil Babka (vba...@suse.cz) wrote: > On 10/07/2013 10:21 PM, Robert C Jennings wrote: > > From: Matt Helsley > > > > It is sometimes useful to move anonymous pages over a pipe rather than > > save/swap them. Check the SPLICE_F_GIFT and SPLICE_F_MOVE flags to see > > if userspace would like

Re: [PATCH 2/2] vmsplice: Add limited zero copy to vmsplice

2013-10-17 Thread Vlastimil Babka
On 10/07/2013 10:21 PM, Robert C Jennings wrote: > From: Matt Helsley > > It is sometimes useful to move anonymous pages over a pipe rather than > save/swap them. Check the SPLICE_F_GIFT and SPLICE_F_MOVE flags to see > if userspace would like to move such pages. This differs from plain > SPLICE_

Re: [PATCH 2/2] vmsplice: Add limited zero copy to vmsplice

2013-10-08 Thread Robert Jennings
* Dave Hansen (d...@sr71.net) wrote: > On 10/07/2013 01:21 PM, Robert C Jennings wrote: > > + if (!buf->offset && (buf->len == PAGE_SIZE) && > > + (buf->flags & PIPE_BUF_FLAG_GIFT) && (sd->flags & SPLICE_F_MOVE)) { > > + struct page *page = buf->page; > > + struct mm_str

Re: [PATCH 2/2] vmsplice: Add limited zero copy to vmsplice

2013-10-08 Thread Dave Hansen
On 10/07/2013 01:21 PM, Robert C Jennings wrote: > + if (!buf->offset && (buf->len == PAGE_SIZE) && > + (buf->flags & PIPE_BUF_FLAG_GIFT) && (sd->flags & SPLICE_F_MOVE)) { > + struct page *page = buf->page; > + struct mm_struct *mm; > + struct vm_area

[PATCH 2/2] vmsplice: Add limited zero copy to vmsplice

2013-10-07 Thread Robert C Jennings
From: Matt Helsley It is sometimes useful to move anonymous pages over a pipe rather than save/swap them. Check the SPLICE_F_GIFT and SPLICE_F_MOVE flags to see if userspace would like to move such pages. This differs from plain SPLICE_F_GIFT in that the memory written to the pipe will no longer