mirror of https://github.com/mkerrisk/man-pages
mmap.2: Add description of MAP_SHARED_VALIDATE and MAP_SYNC
Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
40b7acf14d
commit
d8aeb42ded
30
man2/mmap.2
30
man2/mmap.2
|
@ -126,6 +126,21 @@ are carried through to the underlying file.
|
|||
to the underlying file requires the use of
|
||||
.BR msync (2).)
|
||||
.TP
|
||||
.BR MAP_SHARED_VALIDATE " (since Linux 4.15)"
|
||||
The same as
|
||||
.B MAP_SHARED
|
||||
except that
|
||||
.B MAP_SHARED
|
||||
mappings ignore unknown flags in
|
||||
.IR flags .
|
||||
In contrast when creating mapping of
|
||||
.B MAP_SHARED_VALIDATE
|
||||
mapping type, the kernel verifies all passed flags are known and fails the
|
||||
mapping with
|
||||
.BR EOPNOTSUPP
|
||||
otherwise. This mapping type is also required to be able to use some mapping
|
||||
flags.
|
||||
.TP
|
||||
.B MAP_PRIVATE
|
||||
Create a private copy-on-write mapping.
|
||||
Updates to the mapping are not visible to other processes
|
||||
|
@ -416,6 +431,21 @@ support can later be transparently implemented for glibc.
|
|||
.\" "pthread_create() slow for many threads; also time to revisit 64b
|
||||
.\" context switch optimization?"
|
||||
.TP
|
||||
.BR MAP_SYNC " (since Linux 4.15)"
|
||||
This flags is available only with
|
||||
.B MAP_SHARED_VALIDATE
|
||||
mapping type. Mappings of
|
||||
.B MAP_SHARED
|
||||
type will silently ignore this flag.
|
||||
This flag is supported only for files supporting DAX (direct mapping of persistent
|
||||
memory). For other files, creating mapping with this flag results in
|
||||
.B EOPNOTSUPP
|
||||
error. Shared file mappings with this flag provide the guarantee that while
|
||||
some memory is writeably mapped in the address space of the process, it will
|
||||
be visible in the same file at the same offset even after the system crashes or
|
||||
is rebooted. This allows users of such mappings to make data modifications
|
||||
persistent in a more efficient way using appropriate CPU instructions.
|
||||
.TP
|
||||
.BR MAP_UNINITIALIZED " (since Linux 2.6.33)"
|
||||
Don't clear anonymous pages.
|
||||
This flag is intended to improve performance on embedded devices.
|
||||
|
|
Loading…
Reference in New Issue