]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
madvise.2: Improve MADV_DONTNEED description
authorMichael Kerrisk <mtk.manpages@gmail.com>
Fri, 6 Feb 2015 15:48:54 +0000 (16:48 +0100)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Sat, 21 Feb 2015 07:32:15 +0000 (08:32 +0100)
Cowritten-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man2/madvise.2

index d64ce0f940ff44d49f4aa33d2a229ef393687439..fc11860810e5a5f139795f6f4f6873746bbd1dfc 100644 (file)
@@ -119,11 +119,19 @@ After a successful
 operation,
 the semantics of memory access in the specified region are changed:
 subsequent accesses of pages in the range will succeed, but will result
-in either reloading of the memory contents from the underlying mapped file
+in either repopulating the memory contents from the
+up-to-date contents of the underlying mapped file
 (for shared file mappings, shared anonymous mappings,
 and shmem-based techniques such as System V shared memory segments)
 or zero-fill-on-demand pages for anonymous private mappings.
 
+Note that, when applied to shared mappings,
+.BR MADV_DONTNEED
+might not lead to immediate freeing of the pages in the range.
+The kernel is free to delay freeing the pages until an appropriate moment.
+The resident set size (RSS) of the calling process will be immediately
+reduced however.
+
 .B MADV_DONTNEED
 cannot be applied to locked pages or Huge TLB pages.
 .\"