[PATCH] posix_fadvise.2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



POSIX_FADVISE_NOREUSE is now supported in Linux[1].
Updates text regarding former no op behavior. Indicates the readahead
policy and treatment of file pages read with this flag.

[1]: https://lore.kernel.org/linux-mm/20221230215252.2628425-2-yuzhao@xxxxxxxxxx/

Signed-off-by: T.J. Alumbaugh <talumbau@xxxxxxxxxx>
---
 man2/posix_fadvise.2 | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/man2/posix_fadvise.2 b/man2/posix_fadvise.2
index 57c65c810..5eba3988b 100644
--- a/man2/posix_fadvise.2
+++ b/man2/posix_fadvise.2
@@ -64,7 +64,10 @@ The specified data will be accessed only once.
 .IP
 Before Linux 2.6.18, \fBPOSIX_FADV_NOREUSE\fP had the
 same semantics as \fBPOSIX_FADV_WILLNEED\fP.
-This was probably a bug; since Linux 2.6.18, this flag is a no-op.
+This was probably a bug; from Linux 2.6.18 until Linux 6.2 this flag was
+a no-op. From Linux 6.3 and beyond, \fBPOSIX_FADV_NOREUSE\fP signals
+that that the LRU algorithm can ignore access to mapped page cache marked
+by this flag. This is useful, for example, while streaming large files.
 .TP
 .B POSIX_FADV_WILLNEED
 The specified data will be accessed in the near future.
@@ -151,11 +154,12 @@ to
 .I off_t
 in POSIX.1-2001 TC1.
 .SH NOTES
-Under Linux, \fBPOSIX_FADV_NORMAL\fP sets the readahead window to the
-default size for the backing device; \fBPOSIX_FADV_SEQUENTIAL\fP doubles
-this size, and \fBPOSIX_FADV_RANDOM\fP disables file readahead entirely.
-These changes affect the entire file, not just the specified region
-(but other open file handles to the same file are unaffected).
+Under Linux, \fBPOSIX_FADV_NORMAL\fP and \fBPOSIX_FADV_NOREUSE\fP
+set the readahead window to the default size for the backing device;
+\fBPOSIX_FADV_SEQUENTIAL\fP doubles this size, and
+\fBPOSIX_FADV_RANDOM\fP disables file readahead entirely. These changes
+affect the entire file, not just the specified region (but other open
+file handles to the same file are unaffected).
 .PP
 The contents of the kernel buffer cache can be cleared via the
 .I /proc/sys/vm/drop_caches
-- 
2.40.0.rc1.284.g88254d51c5-goog




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux