Subject: Re: Ongoing projects
To: Soren S. Jorvang <firstname.lastname@example.org>
From: Andrew Doran <email@example.com>
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.