From 4335648dd1383c3ce1956e8e2b957565a946f002 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Tue, 3 Feb 2015 14:27:55 +0100 Subject: [PATCH] madvise.2: MADV_REMOVE cannot be applied to locked or Huge TLB pages See mm/madvise.c::madvise_remove() Signed-off-by: Michael Kerrisk --- man2/madvise.2 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/man2/madvise.2 b/man2/madvise.2 index b9bf50c92..638851ba4 100644 --- a/man2/madvise.2 +++ b/man2/madvise.2 @@ -146,6 +146,7 @@ error .\" bufferpool (shared memory segments) - without writing back to .\" disk/swap space. This feature is also useful for supporting .\" hot-plug memory on UML. +This flag cannot be applied to locked pages or Huge TLB pages. .TP .BR MADV_DONTFORK " (since Linux 2.6.16)" .\" commit f822566165dd46ff5de9bf895cfa6c51f53bb0c4 @@ -342,8 +343,12 @@ is negative. is not a valid. .TP .B EINVAL -.RB ( MADV_DONTNEED ) -The application is attempting to release locked or Huge TLB pages. +.I advice +is +.B MADV_DONTNEED +or +.BR MADV_REMOVE +and the specified address range includes locked or Huge TLB pages. .TP .B EINVAL .I advice