posix_fadvise.2: NOREUSE now supported.
PATCH v4 1/1 posix_fadvise.2: NOREUSE now supported.
POSIX_FADV_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/[email protected]/
---
Changelog
v3 -> v4
- Use semantic newlines
- Format with macros like .B instead of inline \f
v3: https://lore.kernel.org/linux-man/[email protected]/
man/man2/posix_fadvise.2 | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-)
man/man2/posix_fadvise.2 +18 -6
@@ -62,9 +62,15 @@ The specified data will be accessed in random order. .B POSIX_FADV_NOREUSE 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. +Before Linux 2.6.18, +.B POSIX_FADV_NOREUSE +had the same semantics as +.B POSIX_FADV_WILLNEED. +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, +.B POSIX_FADV_NOREUSE +signals 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.
@@ -127,9 +133,15 @@ Linux returned .B EINVAL in this case.) .SH VERSIONS -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. +Under Linux, +.B POSIX_FADV_NORMAL +sets the readahead window to the default size for the backing device; +.B POSIX_FADV_SEQUENTIAL +doubles this size, and +.B POSIX_FADV_RANDOM +disables file readahead entirely. +.B POSIX_FADV_NOREUSE +does not modify the readahead window size. These changes affect the entire file, not just the specified region (but other open file handles to the same file are unaffected). .SS C library/kernel differences
Signature · 1 line
2.46.0
Alejandro Colomar
maintainerHi Yuanchu,
Quoted 1 line
Subject: Re: [PATCH v4] posix_fadvise.2: NOREUSE now supported.
Please spell the full name of the macro.
Quoted 2 lines · Yuanchu Xie
POSIX_FADV_NOREUSEis now supported in Linux[1].
Updates text regarding former no op behavior. Indicates the readahead
Please use 2 spaces after period.
<https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING.d/patches/description#n44>
Quoted 3 lines
policy and treatment of file pages read with this flag.
Please prepend this with a Link: tag, and wrap the URI in <>.
<https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING.d/patches/description#n42>
Quoted 19 lines
Signed-off-by T.J. Alumbaugh <[email protected]>Signed-off-by Yuanchu Xie <[email protected]>---
Changelog
v3 -> v4
- Use semantic newlines
- Format with macros like .B instead of inline \fv3: https://lore.kernel.org/linux-man/[email protected]/
man/man2/posix_fadvise.2 | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-)man/man2/posix_fadvise.2 +0
-0
man/man2/posix_fadvise.2 The specified data will be accessed in random order. · line 68
Quoted 9 lines
man/man2/posix_fadvise.2 +4
-2@@ -62,9 +62,15 @@ The specified data will be accessed in random order. .B POSIX_FADV_NOREUSE 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. +Before Linux 2.6.18, +.B POSIX_FADV_NOREUSE +had the same semantics as +.B POSIX_FADV_WILLNEED.
Please don't reformat text that you don't change at all. Patches should be minimal.
Also, you've made the '.' bold. To keep it in Roman, you should use:
.BR POSIX_FADV_WILLNEED .
man/man2/posix_fadvise.2 The specified data will be accessed in random order. · line 69
Quoted 2 lines
man/man2/posix_fadvise.2 +1
-1-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.
This goes beyond the 80-column right margin. Please break the line in an appropriate point (';').
man/man2/posix_fadvise.2 The specified data will be accessed in random order. · line 72
Quoted 3 lines
man/man2/posix_fadvise.2 +3
-0+From Linux 6.3 and beyond, +.B POSIX_FADV_NOREUSE +signals that the LRU algorithm can ignore access to mapped page cache marked by this flag.
Same here. See man-pages(7). I'd break here right after "algorithm".
$ MANWIDTH=72 man man-pages | sed -n '/Use semantic newlines/,/^$/p'
Use semantic newlines
In the source of a manual page, new sentences should be started on
new lines, long sentences should be split into lines at clause
breaks (commas, semicolons, colons, and so on), and long clauses
should be split at phrase boundaries. This convention, sometimes
known as "semantic newlines", makes it easier to see the effect of
patches, which often operate at the level of individual sentences,
clauses, or phrases.Have a lovely day!
Alex
Quoted 26 lines
man/man2/posix_fadvise.2 +10
-3+This is useful, for example, while streaming large files. .TP .B POSIX_FADV_WILLNEED The specified data will be accessed in the near future.@@ -127,9 +133,15 @@ Linux returned .B EINVAL in this case.) .SH VERSIONS -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. +Under Linux, +.B POSIX_FADV_NORMAL +sets the readahead window to the default size for the backing device; +.B POSIX_FADV_SEQUENTIAL +doubles this size, and +.B POSIX_FADV_RANDOM +disables file readahead entirely. +.B POSIX_FADV_NOREUSE +does not modify the readahead window size. These changes affect the entire file, not just the specified region (but other open file handles to the same file are unaffected). .SS C library/kernel differencesSignature · 1 line
2.46.0
Signature · 1 line
<https://www.alejandro-colomar.es/>
On Wed, Nov 13, 2024 at 3:42 AM Alejandro Colomar <[email protected]> wrote:
...
Quoted 9 lines
Quoted 9 lines
man/man2/posix_fadvise.2 +0
-1@@ -62,9 +62,15 @@ The specified data will be accessed in random order. .B POSIX_FADV_NOREUSE The specified data will be accessed only once. .IP -Before Linux 2.6.18, \fBPOSIX_FADV_NOREUSE\fP had the
Quoted 8 lines
man/man2/posix_fadvise.2 The specified data will be accessed in random order. · line 68
Quoted 5 lines
man/man2/posix_fadvise.2 +4
-1-same semantics as \fBPOSIX_FADV_WILLNEED\fP. +Before Linux 2.6.18, +.B POSIX_FADV_NOREUSE +had the same semantics as +.B POSIX_FADV_WILLNEED.Please don't reformat text that you don't change at all. Patches should be minimal.
I figured I'd touched the paragraph and should get it all into the same format. No problem, I can keep the .B conversion to a minimum.
Thanks for the review! I'll send out an update soon.