Re: zero-copy read() interface

2005-08-21 Thread Andrew Morton
Folkert van Heusden <[EMAIL PROTECTED]> wrote: > > > > What about a zero-copy read-interface? > > > An ioctl (or something) which enables the kernel to do dma directly to > > > the userspace. Of course this should be limited to the root-user or a > > > user with special capabilities (rights) since

Re: zero-copy read() interface

2005-08-19 Thread Jörn Engel
On Thu, 18 August 2005 16:34:18 -0700, dean gaudet wrote: > On Thu, 18 Aug 2005, Folkert van Heusden wrote: > > > Doesn't that one also use copying? I've also heard that using mmap is > > expensive due to pagefaulting. I've found, for example, that copying a > > 1.3GB file using read/write instead

Re: zero-copy read() interface

2005-08-18 Thread dean gaudet
On Thu, 18 Aug 2005, Folkert van Heusden wrote: > Doesn't that one also use copying? I've also heard that using mmap is > expensive due to pagefaulting. I've found, for example, that copying a > 1.3GB file using read/write instead of mmap & memcpy is seconds faster. why would you memcpy if you're

Re: zero-copy read() interface

2005-08-18 Thread Jörn Engel
On Thu, 18 August 2005 12:41:32 +0200, Folkert van Heusden wrote: > > > Just use mmap(). Unlike your proposal, it cooperates with the page > > cache. > > Doesn't that one also use copying? I've also heard that using mmap is > expensive due to pagefaulting. I've found, for example, that copying a

Re: zero-copy read() interface

2005-08-18 Thread Folkert van Heusden
> > What about a zero-copy read-interface? > > An ioctl (or something) which enables the kernel to do dma directly to > > the userspace. Of course this should be limited to the root-user or a > > user with special capabilities (rights) since if a drive screws up, data > > from a different sector (o

Re: zero-copy read() interface

2005-08-18 Thread Jörn Engel
On Thu, 18 August 2005 12:01:52 +0200, Folkert van Heusden wrote: > > What about a zero-copy read-interface? > An ioctl (or something) which enables the kernel to do dma directly to > the userspace. Of course this should be limited to the root-user or a > user with special capabilities (rights) si

Re: zero-copy read() interface

2005-08-18 Thread Christoph Hellwig
On Thu, Aug 18, 2005 at 12:01:52PM +0200, Folkert van Heusden wrote: > What about a zero-copy read-interface? > An ioctl (or something) which enables the kernel to do dma directly to > the userspace. Of course this should be limited to the root-user or a > user with special capabilities (rights) si