POSIX_FADV_NOREUSE
POSIX_FADV_NOREUSE is a file-access advice value indicating that the application does not expect to reuse the specified data.
On Linux it was a no-op from 2.6.18 through 6.2; since 6.3 it permits page replacement to discount accesses. It neither bypasses the page cache nor promises immediate eviction. [1] The v6.14 generic implementation sets FMODE_NOREUSE on the open file description; POSIX_FADV_NORMAL clears it. [2]
SEQUENTIAL does not clear NOREUSE in the same generic implementation; NORMAL clears both NOREUSE and RANDOM. Advice order therefore matters when a shared handle changes workload. [2]
Relations
- related
- posix_fadvise, Buffered I/O, Page cache, POSIX_FADV_DONTNEED, RWF_DONTCACHE, readahead (Linux syscall), POSIX_FADV_RANDOM, POSIX_FADV_SEQUENTIAL
Advantages
- Can express one-pass access without changing to direct I/O.
Limitations
- Advice is nonbinding and kernel-version dependent.