* [PATCH] mremap.2: Add note about mremap with locked areas
@ 2015-08-28 18:42 Eric B Munson
[not found] ` <1440787372-30214-1-git-send-email-emunson-JqFfY2XvxFXQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Eric B Munson @ 2015-08-28 18:42 UTC (permalink / raw)
To: mtk.manpages
Cc: Eric B Munson, Michal Hocko, David Rientjes, linux-man, linux-mm,
linux-kernel
When mremap() is used to move or expand a mapping that is locked with
mlock() or equivalent it will attempt to populate the new area.
However, like mmap(MAP_LOCKED), mremap() will not fail if the area
cannot be populated. Also like mmap(MAP_LOCKED) this might come as a
surprise to users and should be noted.
Signed-off-by: Eric B Munson <emunson@akamai.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: David Rientjes <rientjes@google.com>
Cc: linux-man@vger.kernel.org
Cc: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
---
man2/mremap.2 | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/man2/mremap.2 b/man2/mremap.2
index 071adb5..cf884e6 100644
--- a/man2/mremap.2
+++ b/man2/mremap.2
@@ -196,6 +196,17 @@ and the prototype for
did not allow for the
.I new_address
argument.
+
+If
+.BR mremap ()
+is used to move or expand an area locked with
+.BR mlock (2)
+or equivalent, the
+.BR mremap ()
+call will make a best effort to populate the new area but will not fail
+with
+.B ENOMEM
+if the area cannot be populated.
.SH SEE ALSO
.BR brk (2),
.BR getpagesize (2),
--
1.9.1
--
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] 3+ messages in thread[parent not found: <1440787372-30214-1-git-send-email-emunson-JqFfY2XvxFXQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH] mremap.2: Add note about mremap with locked areas [not found] ` <1440787372-30214-1-git-send-email-emunson-JqFfY2XvxFXQT0dZR+AlfA@public.gmane.org> @ 2015-08-31 9:14 ` Michal Hocko 2015-09-11 11:47 ` Michael Kerrisk (man-pages) 1 sibling, 0 replies; 3+ messages in thread From: Michal Hocko @ 2015-08-31 9:14 UTC (permalink / raw) To: Eric B Munson Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w, David Rientjes, linux-man-u79uwXL29TY76Z2rM5mHXA, linux-mm-Bw31MaZKKs3YtjvyW6yDsg, linux-kernel-u79uwXL29TY76Z2rM5mHXA On Fri 28-08-15 14:42:52, Eric B Munson wrote: > When mremap() is used to move or expand a mapping that is locked with > mlock() or equivalent it will attempt to populate the new area. > However, like mmap(MAP_LOCKED), mremap() will not fail if the area > cannot be populated. Also like mmap(MAP_LOCKED) this might come as a > surprise to users and should be noted. > > Signed-off-by: Eric B Munson <emunson-JqFfY2XvxFXQT0dZR+AlfA@public.gmane.org> > Cc: Michal Hocko <mhocko-AlSwsSmVLrQ@public.gmane.org> Acked-by: Michal Hocko <mhocko-IBi9RG/b67k@public.gmane.org> Thank you for following on this. > Cc: David Rientjes <rientjes-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> > Cc: linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > Cc: linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org > Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > --- > man2/mremap.2 | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/man2/mremap.2 b/man2/mremap.2 > index 071adb5..cf884e6 100644 > --- a/man2/mremap.2 > +++ b/man2/mremap.2 > @@ -196,6 +196,17 @@ and the prototype for > did not allow for the > .I new_address > argument. > + > +If > +.BR mremap () > +is used to move or expand an area locked with > +.BR mlock (2) > +or equivalent, the > +.BR mremap () > +call will make a best effort to populate the new area but will not fail > +with > +.B ENOMEM > +if the area cannot be populated. > .SH SEE ALSO > .BR brk (2), > .BR getpagesize (2), > -- > 1.9.1 -- Michal Hocko SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mremap.2: Add note about mremap with locked areas [not found] ` <1440787372-30214-1-git-send-email-emunson-JqFfY2XvxFXQT0dZR+AlfA@public.gmane.org> 2015-08-31 9:14 ` Michal Hocko @ 2015-09-11 11:47 ` Michael Kerrisk (man-pages) 1 sibling, 0 replies; 3+ messages in thread From: Michael Kerrisk (man-pages) @ 2015-09-11 11:47 UTC (permalink / raw) To: Eric B Munson Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w, Michal Hocko, David Rientjes, linux-man-u79uwXL29TY76Z2rM5mHXA, linux-mm-Bw31MaZKKs3YtjvyW6yDsg, linux-kernel-u79uwXL29TY76Z2rM5mHXA On 08/28/2015 08:42 PM, Eric B Munson wrote: > When mremap() is used to move or expand a mapping that is locked with > mlock() or equivalent it will attempt to populate the new area. > However, like mmap(MAP_LOCKED), mremap() will not fail if the area > cannot be populated. Also like mmap(MAP_LOCKED) this might come as a > surprise to users and should be noted. Thanks, Eric! Applied, with Michael's Acked-by added. Cheers, Michael > Signed-off-by: Eric B Munson <emunson-JqFfY2XvxFXQT0dZR+AlfA@public.gmane.org> > Cc: Michal Hocko <mhocko-AlSwsSmVLrQ@public.gmane.org> > Cc: David Rientjes <rientjes-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> > Cc: linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > Cc: linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org > Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > --- > man2/mremap.2 | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/man2/mremap.2 b/man2/mremap.2 > index 071adb5..cf884e6 100644 > --- a/man2/mremap.2 > +++ b/man2/mremap.2 > @@ -196,6 +196,17 @@ and the prototype for > did not allow for the > .I new_address > argument. > + > +If > +.BR mremap () > +is used to move or expand an area locked with > +.BR mlock (2) > +or equivalent, the > +.BR mremap () > +call will make a best effort to populate the new area but will not fail > +with > +.B ENOMEM > +if the area cannot be populated. > .SH SEE ALSO > .BR brk (2), > .BR getpagesize (2), > -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/ -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-09-11 11:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-28 18:42 [PATCH] mremap.2: Add note about mremap with locked areas Eric B Munson
[not found] ` <1440787372-30214-1-git-send-email-emunson-JqFfY2XvxFXQT0dZR+AlfA@public.gmane.org>
2015-08-31 9:14 ` Michal Hocko
2015-09-11 11:47 ` 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).