Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 06 Nov 1998 13:14:31 +0100
From:      Tor.Egge@fast.no
To:        dillon@apollo.backplane.com
Cc:        cvs-committers@FreeBSD.ORG
Subject:   Re: sendfile.2 (was Re: cvs commit: ...) 
Message-ID:  <199811061214.NAA01603@midten.fast.no>
In-Reply-To: Your message of "Thu, 5 Nov 1998 20:01:20 -0800 (PST)"
References:  <199811060401.UAA00767@apollo.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> :>     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
> :<jkoshy@freebsd.org>
> 
>     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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811061214.NAA01603>