Re: [patch] mmap.2: document the munmap exception for underlying page size

2015-07-24 Thread Michael Kerrisk (man-pages)
Hello David, On 23 July 2015 at 22:52, David Rientjes wrote: > On Thu, 23 Jul 2015, Michael Kerrisk (man-pages) wrote: > >> >> Should we also add a similar comment for the mmap offset? Currently >> >> the man page says: >> >> >> >> "offset must be a multiple of the page size as returned by >>

Re: [patch] mmap.2: document the munmap exception for underlying page size

2015-07-24 Thread Michael Kerrisk (man-pages)
Hello David, On 23 July 2015 at 22:52, David Rientjes rient...@google.com wrote: On Thu, 23 Jul 2015, Michael Kerrisk (man-pages) wrote: Should we also add a similar comment for the mmap offset? Currently the man page says: offset must be a multiple of the page size as returned by

Re: [patch] mmap.2: document the munmap exception for underlying page size

2015-07-23 Thread David Rientjes
On Thu, 23 Jul 2015, Michael Kerrisk (man-pages) wrote: > >> Should we also add a similar comment for the mmap offset? Currently > >> the man page says: > >> > >> "offset must be a multiple of the page size as returned by > >> sysconf(_SC_PAGE_SIZE)." > >> > >> For hugetlbfs, I beieve the

Re: [patch] mmap.2: document the munmap exception for underlying page size

2015-07-23 Thread Michael Kerrisk (man-pages)
On 07/23/2015 01:49 AM, David Rientjes wrote: > On Wed, 22 Jul 2015, Mike Kravetz wrote: > >> On 07/21/2015 05:41 PM, David Rientjes wrote: >>> munmap(2) will fail with an errno of EINVAL for hugetlb memory if the >>> length is not a multiple of the underlying page size. >>> >>>

Re: [patch] mmap.2: document the munmap exception for underlying page size

2015-07-23 Thread Michael Kerrisk (man-pages)
On 07/23/2015 12:03 AM, David Rientjes wrote: > On Wed, 22 Jul 2015, Michael Kerrisk (man-pages) wrote: > >>> diff --git a/man2/mmap.2 b/man2/mmap.2 >>> --- a/man2/mmap.2 >>> +++ b/man2/mmap.2 >>> @@ -383,6 +383,10 @@ All pages containing a part >>> of the indicated range are unmapped, and

Re: [patch] mmap.2: document the munmap exception for underlying page size

2015-07-23 Thread David Rientjes
On Thu, 23 Jul 2015, Michael Kerrisk (man-pages) wrote: Should we also add a similar comment for the mmap offset? Currently the man page says: offset must be a multiple of the page size as returned by sysconf(_SC_PAGE_SIZE). For hugetlbfs, I beieve the offset must be a multiple of

Re: [patch] mmap.2: document the munmap exception for underlying page size

2015-07-23 Thread Michael Kerrisk (man-pages)
On 07/23/2015 01:49 AM, David Rientjes wrote: On Wed, 22 Jul 2015, Mike Kravetz wrote: On 07/21/2015 05:41 PM, David Rientjes wrote: munmap(2) will fail with an errno of EINVAL for hugetlb memory if the length is not a multiple of the underlying page size. Documentation/vm/hugetlbpage.txt

Re: [patch] mmap.2: document the munmap exception for underlying page size

2015-07-23 Thread Michael Kerrisk (man-pages)
On 07/23/2015 12:03 AM, David Rientjes wrote: On Wed, 22 Jul 2015, Michael Kerrisk (man-pages) wrote: diff --git a/man2/mmap.2 b/man2/mmap.2 --- a/man2/mmap.2 +++ b/man2/mmap.2 @@ -383,6 +383,10 @@ All pages containing a part of the indicated range are unmapped, and subsequent references

Re: [patch] mmap.2: document the munmap exception for underlying page size

2015-07-22 Thread David Rientjes
On Wed, 22 Jul 2015, Mike Kravetz wrote: > On 07/21/2015 05:41 PM, David Rientjes wrote: > > munmap(2) will fail with an errno of EINVAL for hugetlb memory if the > > length is not a multiple of the underlying page size. > > > > Documentation/vm/hugetlbpage.txt was updated to specify this

Re: [patch] mmap.2: document the munmap exception for underlying page size

2015-07-22 Thread Mike Kravetz
On 07/21/2015 05:41 PM, David Rientjes wrote: munmap(2) will fail with an errno of EINVAL for hugetlb memory if the length is not a multiple of the underlying page size. Documentation/vm/hugetlbpage.txt was updated to specify this behavior since Linux 4.1 in commit 80d6b94bd69a ("mm, doc:

Re: [patch] mmap.2: document the munmap exception for underlying page size

2015-07-22 Thread David Rientjes
On Wed, 22 Jul 2015, Michael Kerrisk (man-pages) wrote: > > diff --git a/man2/mmap.2 b/man2/mmap.2 > > --- a/man2/mmap.2 > > +++ b/man2/mmap.2 > > @@ -383,6 +383,10 @@ All pages containing a part > > of the indicated range are unmapped, and subsequent references > > to these pages will generate

Re: [patch] mmap.2: document the munmap exception for underlying page size

2015-07-22 Thread Michael Kerrisk (man-pages)
Hi David, On 07/22/2015 02:41 AM, David Rientjes wrote: > munmap(2) will fail with an errno of EINVAL for hugetlb memory if the > length is not a multiple of the underlying page size. > > Documentation/vm/hugetlbpage.txt was updated to specify this behavior > since Linux 4.1 in commit

Re: [patch] mmap.2: document the munmap exception for underlying page size

2015-07-22 Thread Michael Kerrisk (man-pages)
Hi David, On 07/22/2015 02:41 AM, David Rientjes wrote: munmap(2) will fail with an errno of EINVAL for hugetlb memory if the length is not a multiple of the underlying page size. Documentation/vm/hugetlbpage.txt was updated to specify this behavior since Linux 4.1 in commit 80d6b94bd69a

Re: [patch] mmap.2: document the munmap exception for underlying page size

2015-07-22 Thread David Rientjes
On Wed, 22 Jul 2015, Michael Kerrisk (man-pages) wrote: diff --git a/man2/mmap.2 b/man2/mmap.2 --- a/man2/mmap.2 +++ b/man2/mmap.2 @@ -383,6 +383,10 @@ All pages containing a part of the indicated range are unmapped, and subsequent references to these pages will generate .BR

Re: [patch] mmap.2: document the munmap exception for underlying page size

2015-07-22 Thread Mike Kravetz
On 07/21/2015 05:41 PM, David Rientjes wrote: munmap(2) will fail with an errno of EINVAL for hugetlb memory if the length is not a multiple of the underlying page size. Documentation/vm/hugetlbpage.txt was updated to specify this behavior since Linux 4.1 in commit 80d6b94bd69a (mm, doc:

Re: [patch] mmap.2: document the munmap exception for underlying page size

2015-07-22 Thread David Rientjes
On Wed, 22 Jul 2015, Mike Kravetz wrote: On 07/21/2015 05:41 PM, David Rientjes wrote: munmap(2) will fail with an errno of EINVAL for hugetlb memory if the length is not a multiple of the underlying page size. Documentation/vm/hugetlbpage.txt was updated to specify this behavior

[patch] mmap.2: document the munmap exception for underlying page size

2015-07-21 Thread David Rientjes
munmap(2) will fail with an errno of EINVAL for hugetlb memory if the length is not a multiple of the underlying page size. Documentation/vm/hugetlbpage.txt was updated to specify this behavior since Linux 4.1 in commit 80d6b94bd69a ("mm, doc: cleanup and clarify munmap behavior for hugetlb

[patch] mmap.2: document the munmap exception for underlying page size

2015-07-21 Thread David Rientjes
munmap(2) will fail with an errno of EINVAL for hugetlb memory if the length is not a multiple of the underlying page size. Documentation/vm/hugetlbpage.txt was updated to specify this behavior since Linux 4.1 in commit 80d6b94bd69a (mm, doc: cleanup and clarify munmap behavior for hugetlb