Re: [PATCH net-next 4/5] tcp: implement mmap() for zero copy receive

2018-04-20 Thread Eric Dumazet
On 04/20/2018 08:19 AM, Jonathan Corbet wrote: > On Thu, 19 Apr 2018 18:01:32 -0700 > Eric Dumazet wrote: > >> We can keep mmap() nice interface, granted we can add one hook like in >> following patch. >> >> David, do you think such patch would be acceptable by lkml and mm/fs >> maintainers ?

Re: [PATCH net-next 4/5] tcp: implement mmap() for zero copy receive

2018-04-20 Thread Jonathan Corbet
On Thu, 19 Apr 2018 18:01:32 -0700 Eric Dumazet wrote: > We can keep mmap() nice interface, granted we can add one hook like in > following patch. > > David, do you think such patch would be acceptable by lkml and mm/fs > maintainers ? > > Alternative would be implementing an ioctl() or getso

Re: [PATCH net-next 4/5] tcp: implement mmap() for zero copy receive

2018-04-19 Thread David Miller
From: Eric Dumazet Date: Thu, 19 Apr 2018 18:01:32 -0700 > David, do you think such patch would be acceptable by lkml and mm/fs > maintainers ? You will have to ask them directly I think :)

Re: [PATCH net-next 4/5] tcp: implement mmap() for zero copy receive

2018-04-19 Thread Eric Dumazet
On 04/19/2018 04:15 PM, Eric Dumazet wrote: > I am not sure we can keep mmap() API, since we probably need to first lock > the socket, > then grab vm semaphore. > We can keep mmap() nice interface, granted we can add one hook like in following patch. David, do you think such patch would be

Re: [PATCH net-next 4/5] tcp: implement mmap() for zero copy receive

2018-04-19 Thread Eric Dumazet
On 04/16/2018 10:33 AM, Eric Dumazet wrote: > Some networks can make sure TCP payload can exactly fit 4KB pages, > with well chosen MSS/MTU and architectures. > > Implement mmap() system call so that applications can avoid > copying data without complex splice() games. > > Note that a successfu

[PATCH net-next 4/5] tcp: implement mmap() for zero copy receive

2018-04-16 Thread Eric Dumazet
Some networks can make sure TCP payload can exactly fit 4KB pages, with well chosen MSS/MTU and architectures. Implement mmap() system call so that applications can avoid copying data without complex splice() games. Note that a successful mmap( X bytes) on TCP socket is consuming bytes, as if rec