linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [patch] madvise.2: specify MADV_REMOVE returns EINVAL for hugetlbfs
@ 2015-04-02 22:21 David Rientjes
  2015-04-04  7:21 ` Michael Kerrisk (man-pages)
  0 siblings, 1 reply; 2+ messages in thread
From: David Rientjes @ 2015-04-02 22:21 UTC (permalink / raw)
  To: mtk.manpages
  Cc: Andrew Morton, Kirill A. Shutemov, linux-kernel, linux-mm,
	linux-man

madvise(2) actually returns with error EINVAL for MADV_REMOVE when used 
for hugetlb vmas, not EOPNOTSUPP, and this has been the case since 
MADV_REMOVE was introduced in commit f6b3ec238d12 ("madvise(MADV_REMOVE): 
remove pages from tmpfs shm backing store").

Specify the exact behavior.

Signed-off-by: David Rientjes <rientjes@google.com>
---
 man2/madvise.2 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/man2/madvise.2 b/man2/madvise.2
index a3d93bb..00db39d 100644
--- a/man2/madvise.2
+++ b/man2/madvise.2
@@ -184,7 +184,9 @@ any filesystem which supports the
 .BR FALLOC_FL_PUNCH_HOLE
 mode also supports
 .BR MADV_REMOVE .
-Other filesystems fail with the error
+Hugetlbfs will fail with the error
+.BR EINVAL
+and other filesystems fail with the error
 .BR EOPNOTSUPP .
 .TP
 .BR MADV_DONTFORK " (since Linux 2.6.16)"

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-04-04  7:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-02 22:21 [patch] madvise.2: specify MADV_REMOVE returns EINVAL for hugetlbfs David Rientjes
2015-04-04  7:21 ` Michael Kerrisk (man-pages)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).