lkml.org 
[lkml]   [1999]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] - Some notions that I would like comments on
cd_smith@ou.edu wrote:
> Speculative I/O would appear to be a blocking I/O call, but as
> soon as it queued the I/O request, it would return. The result page would
> be marked as unreadable and unwriteable, and the actual I/O blocking would
> be done on a page fault.

You can do this by calling mmap() and then starting a thread to access a
byte from each page sequentially.

Or you can do it by calling mmap() and then starting a thread to read()
a byte at inter-page offsets. This is probably faster because the
kernel does readahead.

If you want exactly the same results as read, use MAP_PRIVATE and have
the reader thread read-then-write, to make local copies of the pages.

disclaimer: I've never done this.

-- Jamie

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.185 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site