Re: mmap

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Sat, 30 May 1998 19:08:12 +0200

--MimeMultipartBoundary
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Stephen R. van den Berg wrote:

> simply start the network transfer on the data mmapped.

Are you sure about that one when using non-blocking socket I/O?

If the OS can handle demand-paging when using non-blocking socket I/O
then this could be a big gain in form of less copying.

Page in:

1. Trigger a thread to open the file mmap it and page in the headers.
2. Parse headers when thread returns
3. Send headers
4. Send the rest of the file directly from the mmap:ed region (socket
writes done by threads to control pagefaults)
5. Unmap the file, which should put the pages back on the free-list.

Unfortunately the current design is based on data-copying in the
main-thread, which makes this a bit hard to implement.
  
/Henrik

--MimeMultipartBoundary--
Received on Tue Jul 29 2003 - 13:15:50 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:11:48 MST