Messages in this thread | | | From | (Matthias Urlichs) | Subject | Re: PATCH: Raw device IO for 2.1.131 | Date | 14 Dec 1998 17:23:43 +0100 |
| |
Jes Sorensen <Jes.Sorensen@cern.ch> writes: > >>>>> "Richard" == Richard Gooch <rgooch@atnf.csiro.au> writes: > > No most of our applications do read(filefd), write(sockfd) and as > such it could probably be done with sendfile, the main issue is that > it requires rewriting the code as a special case for Linux. > Note that if you have a page-aligned buffer and do a page-aligned read, the kernel is / should be (don't ask me...) clever enough to toss your existing page entirely and to map the appropriate page from the file into your space (copy-on-write, of course). That gives you a zero-copy read, at least.
In fact, the stdio implementation in glibc was explicitly changed to support this.
-- Matthias Urlichs | noris network GmbH | smurf@noris.de | ICQ: 20193661
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |