POSIX_FADV_SEQUENTIAL
POSIX_FADV_SEQUENTIAL is a file-access hint indicating that an application expects to read the specified data in increasing-offset order.
Linux documents a doubled backing-device readahead window for the advised handle, across the file rather than only the specified range. This is a policy budget, not a promise that twice as many bytes will be read or that throughput will double. [1]
Linux v6.14 generic_fadvise assigns twice the backing device's ra_pages and clears FMODE_RANDOM, but leaves FMODE_NOREUSE unchanged. NORMAL instead restores the device budget and clears both flags; it does not restore an arbitrary prior configuration. [2]
These changes belong to the open file description shared by dup aliases. A separate open can have independent policy while using the same file cache. Filesystem overrides may differ. [2] [3]
Relations
- related
- POSIX_FADV_RANDOM, POSIX_FADV_NOREUSE, POSIX_FADV_WILLNEED, readahead (Linux syscall), Open file description, Page cache
Advantages
- Communicates expected access order while retaining buffered I/O.
Limitations
- Advice acceptance does not establish prefetch completion or a measured performance benefit.
Citations
- Linux man-pages: posix_fadvise(2), advice and Linux whole-file scope.
- Linux v6.14 mm/fadvise.c: generic_fadvise policy transitions and overrides.
- Linux man-pages: open(2), open file descriptions and duplicated descriptors.
Sources & caveats
- Source review of Linux v6.14 generic advice behavior; not a native experiment or benchmark.