RWF_DONTCACHE
RWF_DONTCACHE is a Linux per-operation flag requesting best-effort removal of page-cache content newly instantiated by a buffered read or write.
The flag is documented since Linux 6.14; previously cached ranges are not pruned by the hint, and unsupported targets report EOPNOTSUPP. Writes initiate writeback, which is not a durability guarantee. [1] The v6.14 filemap_read path still copies cached folios to the caller before attempting drop-behind; this is not O_DIRECT or proof of zero-copy transfer. [2]
Relations
- related
- buffered-io, page-cache, direct-io, posix-fadv-noreuse, posix-fadv-dontneed, fsync
Advantages
- Can limit cache retention for one-pass buffered access while retaining already cached ranges.
Limitations
- No hard guarantee of final cache state, durable completion or improved throughput.