mirror of https://github.com/mkerrisk/man-pages
madvise.2: Starting with Linux 3.5, more file systems support MADV_REMOVE
As from upstream commit: commit 3f31d07571eeea18a7d34db9af21d2285b807a17 Author: Hugh Dickins <hughd@google.com> Date: Tue May 29 15:06:40 2012 -0700 mm/fs: route MADV_REMOVE to FALLOC_FL_PUNCH_HOLE Now tmpfs supports hole-punching via fallocate(), switch madvise_remove() to use do_fallocate() instead of vmtruncate_range(): which extends madvise(,,MADV_REMOVE) support from tmpfs to ext4, ocfs2 and xfs. madvise(,,MADV_REMOVE) support was extended by ext4, ocfs2 and xfs. bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1120294 Justification from Rafael Aquini: Well, that code is committed in kernel since v3.5 (2012) and it surely is the expected behaviour since. It seems to me that madvise(2) man page text for MADV_REMOVE just got out-of-date in that regard. This patch mentions this support in madvise.2 man page. Reworded and corrected by Michael Kerrisk and Hugh Dickins. Thank you. Signed-off-by: Jan Chaloupka <jchaloup@redhat.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
bc6eb5efef
commit
f7282b7bbf
|
@ -148,11 +148,19 @@ bytes containing zero.
|
|||
.\" disk/swap space. This feature is also useful for supporting
|
||||
.\" hot-plug memory on UML.
|
||||
|
||||
Currently,
|
||||
.\" 2.6.18-rc5
|
||||
only shmfs/tmpfs supports this; other filesystems return with the
|
||||
error
|
||||
.BR ENOSYS .
|
||||
Originally, only shmfs/tmpfs supported this; but since Linux 3.5,
|
||||
any filesystem which supports the
|
||||
.BR fallocate(2)
|
||||
mode
|
||||
.BR FALLOC_FL_PUNCH_HOLE
|
||||
also supports the
|
||||
.BR madvise(2)
|
||||
advice
|
||||
.BR MADV_REMOVE .
|
||||
Other filesystems return with the
|
||||
.BR EOPNOTSUPP
|
||||
error.
|
||||
|
||||
The specified address range must be mapped shared and writable.
|
||||
This flag cannot be applied to locked pages or Huge TLB pages.
|
||||
.TP
|
||||
|
|
Loading…
Reference in New Issue