summaryrefslogtreecommitdiffstats
path: root/man2/madvise.2
diff options
context:
space:
mode:
Diffstat (limited to 'man2/madvise.2')
-rw-r--r--man2/madvise.268
1 files changed, 34 insertions, 34 deletions
diff --git a/man2/madvise.2 b/man2/madvise.2
index 441edfbc1..8e778ee91 100644
--- a/man2/madvise.2
+++ b/man2/madvise.2
@@ -27,7 +27,7 @@ Standard C library
.P
.RS -4
Feature Test Macro Requirements for glibc (see
-.BR feature_test_macros (7)):
+.MR feature_test_macros 7 ):
.RE
.P
.BR madvise ():
@@ -83,7 +83,7 @@ but may influence its performance.
All of the
.I advice
values listed here have analogs in the POSIX-specified
-.BR posix_madvise (3)
+.MR posix_madvise 3
function, and the values have the same meanings, with the exception of
.BR MADV_DONTNEED .
.P
@@ -155,7 +155,7 @@ to a multiple of the underlying Huge TLB page size.
The following Linux-specific
.I advice
values have no counterparts in the POSIX-specified
-.BR posix_madvise (3),
+.MR posix_madvise 3 ,
and may or may not have counterparts in the
.BR madvise ()
interface available on other implementations.
@@ -167,7 +167,7 @@ Free up a given range of pages
and its associated backing store.
This is equivalent to punching a hole in the corresponding
range of the backing store (see
-.BR fallocate (2)).
+.MR fallocate 2 ).
Subsequent accesses in the specified address range will see
data with a value of zero.
.\" Databases want to use this feature to drop a section of their
@@ -181,13 +181,13 @@ This flag cannot be applied to locked pages, or
pages.
.IP
In the initial implementation, only
-.BR tmpfs (5)
+.MR tmpfs 5
supported
.BR MADV_REMOVE ;
but since Linux 3.5,
.\" commit 3f31d07571eeea18a7d34db9af21d2285b807a17
any filesystem which supports the
-.BR fallocate (2)
+.MR fallocate 2
.B FALLOC_FL_PUNCH_HOLE
mode also supports
.BR MADV_REMOVE .
@@ -202,10 +202,10 @@ Support for the Huge TLB filesystem was added in Linux v4.3.
.\" commit f822566165dd46ff5de9bf895cfa6c51f53bb0c4
.\" See http://lwn.net/Articles/171941/
Do not make the pages in this range available to the child after a
-.BR fork (2).
+.MR fork 2 .
This is useful to prevent copy-on-write semantics from changing
the physical location of a page if the parent writes to it after a
-.BR fork (2).
+.MR fork 2 .
(Such page relocations cause problems for hardware that
DMAs into the page.)
.\" [PATCH] madvise MADV_DONTFORK/MADV_DOFORK
@@ -234,7 +234,7 @@ DMAs into the page.)
Undo the effect of
.BR MADV_DONTFORK ,
restoring the default behavior, whereby a mapping is inherited across
-.BR fork (2).
+.MR fork 2 .
.TP
.BR MADV_HWPOISON " (since Linux 2.6.32)"
.\" commit 9893e49d64a4874ea67849ee2cfbf3f3d6817573
@@ -267,7 +267,7 @@ looking for pages with identical content.
These are replaced by a single write-protected page (which is automatically
copied if a process later wants to update the content of the page).
KSM merges only private anonymous pages (see
-.BR mmap (2)).
+.MR mmap 2 ).
.IP
The KSM feature is intended for applications that generate many
instances of the same data (e.g., virtualization systems such as KVM).
@@ -324,7 +324,7 @@ The kernel will regularly scan the areas marked as huge page candidates
to replace them with huge pages.
The kernel will also allocate huge pages directly when the region is
naturally aligned to the huge page size (see
-.BR posix_memalign (2)).
+.MR posix_memalign 2 ).
.IP
This feature is primarily aimed at applications that use large mappings of
data and access large regions of that memory at a time (e.g., virtualization
@@ -356,14 +356,14 @@ hugepages are enabled.
Since Linux 5.4,
automatic scan of eligible areas and replacement by huge pages works with
private anonymous pages (see
-.BR mmap (2)),
+.MR mmap 2 ),
shmem pages,
and file-backed pages.
For all memory types,
memory may only be replaced by huge pages on hugepage-aligned boundaries.
For file-mapped memory
\[em]including tmpfs (see
-.BR tmpfs (2))\[em]
+.MR tmpfs 2 )\[em]
the mapping must also be naturally hugepage-aligned within the file.
Additionally,
for file-backed,
@@ -383,7 +383,7 @@ nor can it be stack memory or backed by a DAX-enabled device
The process must also not have
.B PR_SET_THP_DISABLE
set (see
-.BR prctl (2)).
+.MR prctl 2 ).
.IP
The
.BR MADV_HUGEPAGE ,
@@ -416,7 +416,7 @@ or faulted in the future.
.IP
.B MADV_COLLAPSE
supports private anonymous pages (see
-.BR mmap (2)),
+.MR mmap 2 ),
shmem pages,
and file-backed pages.
See
@@ -446,7 +446,7 @@ at least one page must currently be backed by physical memory.
.B MADV_COLLAPSE
is independent of any sysfs
(see
-.BR sysfs (5))
+.MR sysfs 5 )
setting under
.IR /sys/kernel/mm/transparent_hugepage ,
both in terms of determining THP eligibility,
@@ -492,7 +492,7 @@ The effect of
takes precedence over the bit mask that is set via the
.IR /proc/ pid /coredump_filter
file (see
-.BR core (5)).
+.MR core 5 ).
.TP
.BR MADV_DODUMP " (since Linux 3.4)"
Undo the effect of an earlier
@@ -524,7 +524,7 @@ The
.B MADV_FREE
operation
can be applied only to private anonymous pages (see
-.BR mmap (2)).
+.MR mmap 2 ).
Before Linux 4.12,
.\" commit 93e06c7a645343d222c9a838834a51042eebbbf7
when freeing pages on a swapless system,
@@ -534,7 +534,7 @@ regardless of memory pressure.
.BR MADV_WIPEONFORK " (since Linux 4.14)"
.\" commit d2cd9ede6e193dd7d88b6d27399e96229a551b19
Present the child process with zero-filled memory in this range after a
-.BR fork (2).
+.MR fork 2 .
This is useful in forking servers in order to ensure
that sensitive per-process data
(for example, PRNG seeds, cryptographic secrets, and so on)
@@ -543,15 +543,15 @@ is not handed to child processes.
The
.B MADV_WIPEONFORK
operation can be applied only to private anonymous pages (see
-.BR mmap (2)).
+.MR mmap 2 ).
.IP
Within the child created by
-.BR fork (2),
+.MR fork 2 ,
the
.B MADV_WIPEONFORK
setting remains in place on the specified address range.
This setting is cleared during
-.BR execve (2).
+.MR execve 2 .
.TP
.BR MADV_KEEPONFORK " (since Linux 4.14)"
.\" commit d2cd9ede6e193dd7d88b6d27399e96229a551b19
@@ -847,7 +847,7 @@ above under
albeit with some variation in semantics.
.P
POSIX.1-2001 describes
-.BR posix_madvise (3)
+.MR posix_madvise 3
with constants
.BR POSIX_MADV_NORMAL ,
.BR POSIX_MADV_RANDOM ,
@@ -885,14 +885,14 @@ depending on the setting of the
.B CONFIG_ADVISE_SYSCALLS
configuration option.
.SH SEE ALSO
-.BR getrlimit (2),
-.BR memfd_secret (2),
-.BR mincore (2),
-.BR mmap (2),
-.BR mprotect (2),
-.BR msync (2),
-.BR munmap (2),
-.BR prctl (2),
-.BR process_madvise (2),
-.BR posix_madvise (3),
-.BR core (5)
+.MR getrlimit 2 ,
+.MR memfd_secret 2 ,
+.MR mincore 2 ,
+.MR mmap 2 ,
+.MR mprotect 2 ,
+.MR msync 2 ,
+.MR munmap 2 ,
+.MR prctl 2 ,
+.MR process_madvise 2 ,
+.MR posix_madvise 3 ,
+.MR core 5