readahead(2) - Linux

Ed Schouten ed at
Tue Mar 4 08:49:15 UTC 2008

* Julian Elischer <julian at> wrote:
> the aim is to load it into system memory but not copy anything into
> user memory.

madvise() should do the trick, then.

The manpage is quite misleading:

"readahead() populates the page cache with data from a file so that
subsequent reads from that file will not block on disk I/O."

This isn't guaranteed, of course.

 Ed Schouten <ed at>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url :

More information about the freebsd-hackers mailing list