readahead (Linux syscall)
The Linux readahead syscall requests advance loading of a file range into the page cache without advancing the open file description's offset.
Ranges are handled in whole pages and stop at end of file. Success returns zero, not a fetched-byte count; errors return -1 and set errno. Subsequent reads benefit only if data arrives in time and remains cached. [1]
The call may block while locating blocks through filesystem metadata, including the documented ext2/ext3/ext4 indirect-block case. Background data reads therefore do not establish a hard nonblocking-call guarantee. [1]
Relations
- related
- posix-fadv-willneed, rwf-nowait, page-cache, buffered-io
Limitations
- This Linux-specific interface is distinct from the general automatic read-ahead policy triggered by ordinary reads. [1]