Subject: Re: Ongoing projects
To: Soren S. Jorvang <soren@t.dk>
From: Andrew Doran <ad@fionn.sports.gov.uk>
List: tech-kern
Date: 05/07/1999 12:32:40
"Soren S. Jorvang" wrote:
> 
> On Fri, May 07, 1999 at 09:34:57AM +0100, Andrew Doran wrote:
> > > How about a more generalized syscall like move(2) or so that would
> > > move blocks of data from file descriptor to file descriptor,
> > > bypassing kernel/user copies in the way of sendfile(2)?
> >
> > The original call on Windows NT ( SendFile() ) let's you do this,
> > but for compatibility how about implementing sendfile() with
> > move(), so we retain compatibility with FreeBSD and HP-UX?
> 
> >From what I gather, the various Unix (and NT) sendfile-ish
> calls are not internally compatible, so I am not sure how to
> handle compatibility, but I think having the real call be move(2)
> (or perhaps copy(2)) would be really nice.

I don't see how the internals matter to Joe Application as
long as we emulate the API and functionality (even in userland w/
a call to move(2)/copy(2), as you suggest). 

One thing that f**ks me off about sendfile() is the fact that
it wants iovecs for headers/footers. So, for a webserver to 
add headers, it first has to mmap(), etc. A direct copy from
memory should be available too.

http://www.freebsd.org/cgi/man.cgi?query=sendfile&apropos=0&sektion=0&manpath=FreeBSD+4.0-current&format=html
http://docs.hp.com:80/dynaweb/hpux11/hpuxen1a/rvl3en1a/@Generic__BookTextView/59894;td=3

Andy.