process_madvise.2: Defer to madvise(2) for description of 'advice' flags

Rather than repeating the description of MADV_COLD and MADV_PAGEOUT
in two pages, centralize the discussion in madvise(2), and refer
from process_madvise(2) ro madvise(2).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2021-02-13 22:40:11 +01:00
parent c9c9ab2e69
commit c7faf9452e
1 changed files with 9 additions and 31 deletions

View File

@ -96,7 +96,15 @@ or accessible via the call
.PP
The
.I advice
argument is one of the values listed below.
argument is one of the following values:
.TP
.BR MADV_COLD
See
.BR madvise (2).
.TP
.BR MADV_PAGEOUT
See
.BR madvise (2).
.PP
The
.I flags
@ -132,36 +140,6 @@ because of the performance implications of applying the hint,
the caller must have the
.B CAP_SYS_ADMIN
capability.
.\"
.\" ======================================================================
.\"
.SS Linux-specific advice values
The following Linux-specific
.I advice
values have no counterparts in the POSIX-specified
.BR posix_madvise (3),
and may or may not have counterparts in the
.BR madvise (2)
interface available on other implementations.
.TP
.BR MADV_COLD
.\" commit 9c276cc65a58faf98be8e56962745ec99ab87636
Deactivate a given range of pages.
This will make the pages a more probable
reclaim target should there be a memory pressure.
This is a nondestructive operation.
The advice might be ignored for some pages in the range when it is not
applicable.
.TP
.BR MADV_PAGEOUT
.\" commit 1a4e58cce84ee88129d5d49c064bd2852b481357
Reclaim a given range of pages.
This is done to free up memory occupied by these pages.
If a page is anonymous, it will be swapped out.
If a page is file-backed and dirty, it will be written back to the backing
storage.
The advice might be ignored for some pages in the range when it is not
applicable.
.SH RETURN VALUE
On success,
.BR process_madvise ()