Date: Sat, 17 Mar 2001 19:41:27 +0100 From: Maxime Henrion <mux@qualys.com> To: arch@FreeBSD.org Cc: Dag-Erling Smorgrav <des@ofug.org> Subject: Re: Proposal for a new syscall Message-ID: <20010317194127.D420@nebula.cybercable.fr> In-Reply-To: <xzpzoekb5zt.fsf@flood.ping.uio.no>; from des@ofug.org on Sat, Mar 17, 2001 at 07:33:10PM %2B0100 References: <20010317164411.A420@nebula.cybercable.fr> <xzpzoekcs3r.fsf@flood.ping.uio.no> <20010317173444.B420@nebula.cybercable.fr> <xzp4rwsco0r.fsf@flood.ping.uio.no> <20010317183137.C420@nebula.cybercable.fr> <xzpzoekb5zt.fsf@flood.ping.uio.no>
next in thread | previous in thread | raw e-mail | index | archive | help
Dag-Erling Smorgrav wrote: > Maxime Henrion <mux@qualys.com> writes: > > > > > > such a syscall in the kernel would allow to implement "zero-copy" > > > > > > wherever it is feasible. > > > > > No. It would save you two copies and a bunch of syscalls, but it > > > > > wouldn't be real zero-copy, just "n-2 copy" instead of "n copy". > > > > And if n == 2 ? > > > It's never the case. I think the best you can do in userland is n = 3, > > I'm talking about a syscall. > Yes. I already told you that your proposed syscall would at best > reduce the number of copies by two. Now I'm telling you that the > minimum number of copies, without your proposed syscall, can't be less > than 3. You do the math. Ok. > > Why couldn't it be zero-copy if sendfile() already does this ? > Sendfile(2) doesn't do zero-copy, it does 2-copy (in the best of > cases). Thanks, I stand corrected. Perhaps that should be mentioned in the man page ? Currently, it says this : IMPLEMENTATION NOTES The FreeBSD implementation of sendfile() is "zero-copy", meaning that it has been optimized so that copying of the file data is avoided. Maxime -- Don't be fooled by cheap finnish imitations ; BSD is the One True Code Key fingerprint = F9B6 1D5A 4963 331C 88FC CA6A AB50 1EF2 8CBE 99D6 Public Key : http://www.epita.fr/~henrio_m/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010317194127.D420>