From owner-freebsd-arch Sat Mar 17 10:41:59 2001 Delivered-To: freebsd-arch@freebsd.org Received: from nebula.cybercable.fr (d217.dhcp212-126.cybercable.fr [212.198.126.217]) by hub.freebsd.org (Postfix) with ESMTP id 6AE3A37B718 for ; Sat, 17 Mar 2001 10:41:55 -0800 (PST) (envelope-from mux@qualys.com) Received: (from mux@localhost) by nebula.cybercable.fr (8.11.3/8.11.3) id f2HIfS106445; Sat, 17 Mar 2001 19:41:28 +0100 (CET) (envelope-from mux) Date: Sat, 17 Mar 2001 19:41:27 +0100 From: Maxime Henrion To: arch@FreeBSD.org Cc: Dag-Erling Smorgrav Subject: Re: Proposal for a new syscall Message-ID: <20010317194127.D420@nebula.cybercable.fr> References: <20010317164411.A420@nebula.cybercable.fr> <20010317173444.B420@nebula.cybercable.fr> <20010317183137.C420@nebula.cybercable.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from des@ofug.org on Sat, Mar 17, 2001 at 07:33:10PM +0100 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Dag-Erling Smorgrav wrote: > Maxime Henrion 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