tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Equivalent of the system call sendfile



On Tue, Nov 25, 2008 at 10:53:52AM +0000, Wouter Klouwen wrote:
> Ignatios Souvatzis(is%netbsd.org@localhost) said 2008.11.25 09:30:10 +0000:
> > On Mon, Nov 24, 2008 at 04:11:58PM -0800, kamel derouiche wrote:
> > > Gnu / Linux offers the system call sendfile (sys /
> > > sendfile.h), what is that there is a meme
> > > thing(matter) in netbsd?
> > 
> > But as for sendfile() - due to page loaning, we have about the same
> > performance for normal write() and avoid a long-time loop inside the
> > kernel. Details are in our mailing list archives - search for
> > UBC, UVM, "page loading" and / or "sendfile".
> 
> I thought in NetBSD you had to do this by mmap()ing the file descriptor. Did
> this change recently?

Oops, you're right ... read() doesn't work. So:

mmap() the file - or a big portion of it

write() to the network.

        -is


Home | Main Index | Thread Index | Old Index