Date: Thu, 5 Nov 1998 18:56:46 -0800 (PST) From: Matthew Dillon <dillon@apollo.backplane.com> To: David Greenman <dg@root.com> Cc: dag-erli@ifi.uio.no (Dag-Erling C. =?iso-8859-1?Q?Sm=F8rgrav?= ), cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: sendfile.2 (was Re: cvs commit: ...) Message-ID: <199811060256.SAA00345@apollo.backplane.com> References: <199811051805.KAA02734@implode.root.com>
next in thread | previous in thread | raw e-mail | index | archive | help
:>David Greenman <dg@FreeBSD.ORG> writes:
:>> Implemented zero-copy TCP/IP extensions via sendfile(2) - send a
:>> file to a stream socket. sendfile(2) is similar to implementations in
:>> HP-UX, Linux, and other systems, but the API is more extensive and
:>> addresses many of the complaints that the Apache Group and others have
:...
:>
:>Huzzah!
:>
:>Are you planning to rewrite FreeBSD's ftpd to use sendfile(2)? If not,
:>mind if I do? :)
:
: Yes, I'm running the code on wcarchive and that part of dg-ftpd was similar
:to the standard BSD code...so the changes have more or less already been
:made - I just need to retrofit them.
:
:-DG
:
:David Greenman
:Co-founder/Principal Architect, The FreeBSD Project
Impressive! Does it handle non-blocking sockets properly? i.e. not
block? You do not have EWOULDBLOCK or EAGAIN or anything like that listed
in the ERRORS section of the manual page.
It would be cool if it worked with arbitrary descriptor types, but I
understand the difficulty. What about tcp-to-tcp (i.e. transparent proxy)
copies?
Another thing that would be useful now that mmap() works reliably
would be to actually use it in the stdio library for read operations
on plain files: [f]getc(), fgets(), and fread(). The only difficulty
here is in how to deal with file truncation issues, since accessing
mmap'd pages beyond the file's size will segfault.
-Matt
Matthew Dillon Engineering, HiWay Technologies, Inc. & BEST Internet
Communications & God knows what else.
<dillon@backplane.com> (Please include original email in any response)
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811060256.SAA00345>
