From owner-cvs-all Fri Nov 6 04:15:27 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA22468 for cvs-all-outgoing; Fri, 6 Nov 1998 04:15:27 -0800 (PST) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from midten.fast.no (midten.fast.no [195.139.251.11]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA22456 for ; Fri, 6 Nov 1998 04:15:17 -0800 (PST) (envelope-from tegge@fast.no) Received: from fast.no (IDENT:tegge@midten.fast.no [195.139.251.11]) by midten.fast.no (8.9.1/8.9.1) with ESMTP id NAA01603; Fri, 6 Nov 1998 13:14:31 +0100 (CET) Message-Id: <199811061214.NAA01603@midten.fast.no> To: dillon@apollo.backplane.com Cc: cvs-committers@FreeBSD.ORG Subject: Re: sendfile.2 (was Re: cvs commit: ...) From: Tor.Egge@fast.no In-Reply-To: Your message of "Thu, 5 Nov 1998 20:01:20 -0800 (PST)" References: <199811060401.UAA00767@apollo.backplane.com> X-Mailer: Mew version 1.70 on Emacs 19.34.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Fri, 06 Nov 1998 13:14:31 +0100 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk > :> 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. > : > :For what its worth, the SFIO library from AT&T already supports > :this. I don't remember what copyright it is released under though. > : > :Koshy > : > > Well, it isn't that difficult to do... it would take maybe 20 minutes > to implement. A simple MAP_PRIVATE replacement of __srefill() and maybe > a little code to avoid unnecessary copy-on-write ops. Enabling vfs_ioopts does most of this implicitly. Unfortunately, there is a bug involved, that might cause a deadlock when reading the last "fragment" of the file. The same deadlock can be triggered by explicit use of mmap, e.g. PR 8416. - Tor Egge To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message