Re: Thread implementations...

Marc Slemko (marcs@znep.com)
Fri, 26 Jun 1998 10:08:02 -0700 (PDT)


On 26 Jun 1998, Linus Torvalds wrote:

> In article <Pine.BSF.3.95.980625230252.2272q-100000@alive.znep.com>,
> Marc Slemko <marcs@znep.com> wrote:
> >
> >HPUX's sendfile is:
> >
> > ssize_t sendfile(int s, int fd, off_t offset, size_t nbytes,
> > const struct iovec *hdtrl, int flags);
> >
> >which allows headers and trailers as iovecs.
>
> That is just broken.
>
> If their system call overhead is so big that it makes sense to have the
> iovec's be part of "sendfile()", they must be doing something wrong.

Rule 48: If possible, present all associated data to the transport layer
at the same time.

This is especially important when you have small headers and trailers,
because otherwise you can end up with an extra two small segments on the
wire for no reason.

There is no dispute that sendfile() is just a specialized case of a
general problem that would be cool, but more difficult, to solve. I still
think it (or something like it with better semantics) is potentially
useful and is required to compete with NT servers in terms of benchmark
numbers at the high end of static file serving and can serve as a good
starting point for work on a more generalized solution.

No matter what the semantics, sendfile() is obviously somehow usable for
high performance web servers because Zeus has the option of using it on
HPUX, and they suggest it is a noticible win.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu