From owner-cvs-all Thu Nov 5 18:57:22 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA07720 for cvs-all-outgoing; Thu, 5 Nov 1998 18:57:22 -0800 (PST) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA07715; Thu, 5 Nov 1998 18:57:21 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.1/8.9.1) id SAA00345; Thu, 5 Nov 1998 18:56:46 -0800 (PST) (envelope-from dillon) Date: Thu, 5 Nov 1998 18:56:46 -0800 (PST) From: Matthew Dillon Message-Id: <199811060256.SAA00345@apollo.backplane.com> To: David Greenman 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: ...) References: <199811051805.KAA02734@implode.root.com> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk :>David Greenman 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. (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