* Re: [patch -mm] mm, doc: cleanup and clarify munmap behavior for hugetlb memory fix
[not found] <057a01d06ddd$ff2550e0$fd6ff2a0$@alibaba-inc.com>
@ 2015-04-03 7:18 ` Hillf Danton
0 siblings, 0 replies; 6+ messages in thread
From: Hillf Danton @ 2015-04-03 7:18 UTC (permalink / raw)
To: David Rientjes; +Cc: linux-mm, linux-kernel, Andrew Morton
>
> Don't only specify munmap(2) behavior with respect the hugetlb memory, all
> other syscalls get naturally aligned to the native page size of the
> processor. Rather, pick out munmap(2) as a specific example.
>
> Signed-off-by: David Rientjes <rientjes@google.com>
> ---
Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com>
> Documentation/vm/hugetlbpage.txt | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/vm/hugetlbpage.txt b/Documentation/vm/hugetlbpage.txt
> index 1270fb1..030977f 100644
> --- a/Documentation/vm/hugetlbpage.txt
> +++ b/Documentation/vm/hugetlbpage.txt
> @@ -313,8 +313,11 @@ into /proc/sys/vm/hugetlb_shm_group. It is possible for same or different
> applications to use any combination of mmaps and shm* calls, though the mount of
> filesystem will be required for using mmap calls without MAP_HUGETLB.
>
> -When using munmap(2) to unmap hugetlb memory, the length specified must be
> -hugepage aligned, otherwise it will fail with errno set to EINVAL.
> +Syscalls that operate on memory backed by hugetlb pages only have their lengths
> +aligned to the native page size of the processor; they will normally fail with
> +errno set to EINVAL or exclude hugetlb pages that extend beyond the length if
> +not hugepage aligned. For example, munmap(2) will fail if memory is backed by
> +a hugetlb page and the length is smaller than the hugepage size.
>
>
> Examples
>
> --
> 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 [flat|nested] 6+ messages in thread
* Re: [patch -mm] mm, doc: cleanup and clarify munmap behavior for hugetlb memory fix
2015-04-09 19:46 ` David Rientjes
@ 2015-04-11 13:26 ` Jonathan Corbet
0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Corbet @ 2015-04-11 13:26 UTC (permalink / raw)
To: David Rientjes
Cc: Andrew Morton, Hugh Dickins, Davide Libenzi, Luiz Capitulino,
Shuah Khan, Andrea Arcangeli, Joern Engel, Jianguo Wu,
Eric B Munson, linux-mm, linux-kernel, linux-api, linux-doc
On Thu, 9 Apr 2015 12:46:09 -0700 (PDT)
David Rientjes <rientjes@google.com> wrote:
> It's been merged into that tree, but I would still appreciate your
> ack!
Easy enough.
Acked-by: Jonathan Corbet <corbet@lwn.net>
jon
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch -mm] mm, doc: cleanup and clarify munmap behavior for hugetlb memory fix
2015-04-04 9:34 ` Jonathan Corbet
@ 2015-04-09 19:46 ` David Rientjes
2015-04-11 13:26 ` Jonathan Corbet
0 siblings, 1 reply; 6+ messages in thread
From: David Rientjes @ 2015-04-09 19:46 UTC (permalink / raw)
To: Jonathan Corbet
Cc: Andrew Morton, Hugh Dickins, Davide Libenzi, Luiz Capitulino,
Shuah Khan, Andrea Arcangeli, Joern Engel, Jianguo Wu,
Eric B Munson, linux-mm, linux-kernel, linux-api, linux-doc
On Sat, 4 Apr 2015, Jonathan Corbet wrote:
> On Thu, 2 Apr 2015 15:50:15 -0700 (PDT)
> David Rientjes <rientjes@google.com> wrote:
>
> > Don't only specify munmap(2) behavior with respect the hugetlb memory, all
> > other syscalls get naturally aligned to the native page size of the
> > processor. Rather, pick out munmap(2) as a specific example.
>
> So I was going to apply this to the docs tree, but it doesn't even come
> close. What tree was this patch generated against?
>
Sorry, it's not intended to go through the docs tree, it's a patch to fix
mm-doc-cleanup-and-clarify-munmap-behavior-for-hugetlb-memory.patch in
-mm. It's been merged into that tree, but I would still appreciate your
ack!
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch -mm] mm, doc: cleanup and clarify munmap behavior for hugetlb memory fix
2015-04-02 22:50 ` [patch -mm] mm, doc: cleanup and clarify munmap behavior for hugetlb memory fix David Rientjes
2015-04-03 1:05 ` Hugh Dickins
@ 2015-04-04 9:34 ` Jonathan Corbet
2015-04-09 19:46 ` David Rientjes
1 sibling, 1 reply; 6+ messages in thread
From: Jonathan Corbet @ 2015-04-04 9:34 UTC (permalink / raw)
To: David Rientjes
Cc: Andrew Morton, Hugh Dickins, Davide Libenzi, Luiz Capitulino,
Shuah Khan, Andrea Arcangeli, Joern Engel, Jianguo Wu,
Eric B Munson, linux-mm, linux-kernel, linux-api, linux-doc
On Thu, 2 Apr 2015 15:50:15 -0700 (PDT)
David Rientjes <rientjes@google.com> wrote:
> Don't only specify munmap(2) behavior with respect the hugetlb memory, all
> other syscalls get naturally aligned to the native page size of the
> processor. Rather, pick out munmap(2) as a specific example.
So I was going to apply this to the docs tree, but it doesn't even come
close. What tree was this patch generated against?
Thanks,
jon
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch -mm] mm, doc: cleanup and clarify munmap behavior for hugetlb memory fix
2015-04-02 22:50 ` [patch -mm] mm, doc: cleanup and clarify munmap behavior for hugetlb memory fix David Rientjes
@ 2015-04-03 1:05 ` Hugh Dickins
2015-04-04 9:34 ` Jonathan Corbet
1 sibling, 0 replies; 6+ messages in thread
From: Hugh Dickins @ 2015-04-03 1:05 UTC (permalink / raw)
To: David Rientjes
Cc: Andrew Morton, Hugh Dickins, Jonathan Corbet, Davide Libenzi,
Luiz Capitulino, Shuah Khan, Andrea Arcangeli, Joern Engel,
Jianguo Wu, Eric B Munson, linux-mm, linux-kernel, linux-api,
linux-doc
On Thu, 2 Apr 2015, David Rientjes wrote:
> Don't only specify munmap(2) behavior with respect the hugetlb memory, all
> other syscalls get naturally aligned to the native page size of the
> processor. Rather, pick out munmap(2) as a specific example.
>
> Signed-off-by: David Rientjes <rientjes@google.com>
Thanks, yes, good wording: it is best to be a bit vague here,
since each msyscall takes the approach most convenient for it.
Acked-by: Hugh Dickins <hughd@google.com>
> ---
> Documentation/vm/hugetlbpage.txt | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/vm/hugetlbpage.txt b/Documentation/vm/hugetlbpage.txt
> index 1270fb1..030977f 100644
> --- a/Documentation/vm/hugetlbpage.txt
> +++ b/Documentation/vm/hugetlbpage.txt
> @@ -313,8 +313,11 @@ into /proc/sys/vm/hugetlb_shm_group. It is possible for same or different
> applications to use any combination of mmaps and shm* calls, though the mount of
> filesystem will be required for using mmap calls without MAP_HUGETLB.
>
> -When using munmap(2) to unmap hugetlb memory, the length specified must be
> -hugepage aligned, otherwise it will fail with errno set to EINVAL.
> +Syscalls that operate on memory backed by hugetlb pages only have their lengths
> +aligned to the native page size of the processor; they will normally fail with
> +errno set to EINVAL or exclude hugetlb pages that extend beyond the length if
> +not hugepage aligned. For example, munmap(2) will fail if memory is backed by
> +a hugetlb page and the length is smaller than the hugepage size.
>
>
> Examples
^ permalink raw reply [flat|nested] 6+ messages in thread
* [patch -mm] mm, doc: cleanup and clarify munmap behavior for hugetlb memory fix
2015-04-02 22:40 ` David Rientjes
@ 2015-04-02 22:50 ` David Rientjes
2015-04-03 1:05 ` Hugh Dickins
2015-04-04 9:34 ` Jonathan Corbet
0 siblings, 2 replies; 6+ messages in thread
From: David Rientjes @ 2015-04-02 22:50 UTC (permalink / raw)
To: Andrew Morton
Cc: Hugh Dickins, Jonathan Corbet, Davide Libenzi, Luiz Capitulino,
Shuah Khan, Andrea Arcangeli, Joern Engel, Jianguo Wu,
Eric B Munson, linux-mm, linux-kernel, linux-api, linux-doc
Don't only specify munmap(2) behavior with respect the hugetlb memory, all
other syscalls get naturally aligned to the native page size of the
processor. Rather, pick out munmap(2) as a specific example.
Signed-off-by: David Rientjes <rientjes@google.com>
---
Documentation/vm/hugetlbpage.txt | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/Documentation/vm/hugetlbpage.txt b/Documentation/vm/hugetlbpage.txt
index 1270fb1..030977f 100644
--- a/Documentation/vm/hugetlbpage.txt
+++ b/Documentation/vm/hugetlbpage.txt
@@ -313,8 +313,11 @@ into /proc/sys/vm/hugetlb_shm_group. It is possible for same or different
applications to use any combination of mmaps and shm* calls, though the mount of
filesystem will be required for using mmap calls without MAP_HUGETLB.
-When using munmap(2) to unmap hugetlb memory, the length specified must be
-hugepage aligned, otherwise it will fail with errno set to EINVAL.
+Syscalls that operate on memory backed by hugetlb pages only have their lengths
+aligned to the native page size of the processor; they will normally fail with
+errno set to EINVAL or exclude hugetlb pages that extend beyond the length if
+not hugepage aligned. For example, munmap(2) will fail if memory is backed by
+a hugetlb page and the length is smaller than the hugepage size.
Examples
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-04-11 13:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <057a01d06ddd$ff2550e0$fd6ff2a0$@alibaba-inc.com>
2015-04-03 7:18 ` [patch -mm] mm, doc: cleanup and clarify munmap behavior for hugetlb memory fix Hillf Danton
2015-03-26 23:23 [patch 1/2] mm, doc: cleanup and clarify munmap behavior for hugetlb memory David Rientjes
2015-03-30 1:35 ` Hugh Dickins
2015-04-02 22:40 ` David Rientjes
2015-04-02 22:50 ` [patch -mm] mm, doc: cleanup and clarify munmap behavior for hugetlb memory fix David Rientjes
2015-04-03 1:05 ` Hugh Dickins
2015-04-04 9:34 ` Jonathan Corbet
2015-04-09 19:46 ` David Rientjes
2015-04-11 13:26 ` Jonathan Corbet
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).