Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1215519 > unrolled thread

[PATCH] mremap.2: Add note about mremap with locked areas

Started byEric B Munson <emunson@akamai.com>
First post2015-08-28 20:50 +0200
Last post2015-08-31 11:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] mremap.2: Add note about mremap with locked areas Eric B Munson <emunson@akamai.com> - 2015-08-28 20:50 +0200
    Re: [PATCH] mremap.2: Add note about mremap with locked areas Michal Hocko <mhocko@kernel.org> - 2015-08-31 11:20 +0200

#1215519 — [PATCH] mremap.2: Add note about mremap with locked areas

FromEric B Munson <emunson@akamai.com>
Date2015-08-28 20:50 +0200
Subject[PATCH] mremap.2: Add note about mremap with locked areas
Message-ID<q2wSS-3bU-17@gated-at.bofh.it>
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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1216120

FromMichal Hocko <mhocko@kernel.org>
Date2015-08-31 11:20 +0200
Message-ID<q3tpU-3oo-9@gated-at.bofh.it>
In reply to#1215519
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@akamai.com>
> Cc: Michal Hocko <mhocko@suse.cz>

Acked-by: Michal Hocko <mhocko@suse.com>

Thank you for following on this.

> 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

-- 
Michal Hocko
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web