From owner-freebsd-arch Sat Mar 17 7:50:21 2001 Delivered-To: freebsd-arch@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id A7D3237B718 for ; Sat, 17 Mar 2001 07:50:18 -0800 (PST) (envelope-from des@ofug.org) Received: (from des@localhost) by flood.ping.uio.no (8.9.3/8.9.3) id QAA73518; Sat, 17 Mar 2001 16:50:16 +0100 (CET) (envelope-from des@ofug.org) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Maxime Henrion Cc: arch@FreeBSD.ORG Subject: Re: Proposal for a new syscall References: <20010317164411.A420@nebula.cybercable.fr> From: Dag-Erling Smorgrav Date: 17 Mar 2001 16:50:16 +0100 In-Reply-To: Maxime Henrion's message of "Sat, 17 Mar 2001 16:44:11 +0100" Message-ID: Lines: 23 User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Maxime Henrion writes: > While I was writing a network application, I was thinking that it would > be nice to have a syscall that could "bind" two file descriptors, of any > type (socket, file...), a bit like funopen() does in the libc. You don't seem to understand what funopen() really does... > Having > 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". > Then, sendfile() would just be a particular case of this syscall, where > the input fd is a file and the output fd is a socket, and it could be > rewritten using it. No. Have you looked at the sendfile() code? DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message