All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] memfd_create.2: Add description of MFD_HUGETLB (hugetlbfs) support
@ 2017-09-15 21:43 ` Mike Kravetz
  0 siblings, 0 replies; 6+ messages in thread
From: Mike Kravetz @ 2017-09-15 21:43 UTC (permalink / raw)
  To: mtk.manpages
  Cc: linux-man, linux-kernel, linux-api, Michal Hocko, Hugh Dickins,
	Andrea Arcangeli, Kirill A . Shutemov, Mike Kravetz

hugetlbfs support for memfd_create was recently merged by Linus and
should be in the Linux 4.14 release.  To request hugetlbfs support
a new memfd_create flag (MFD_HUGETLB) was added.

This patch documents the following commit:

commit 749df87bd7bee5a79cef073f5d032ddb2b211de8
Author: Mike Kravetz <mike.kravetz@oracle.com>
Date:   Wed Sep 6 16:24:16 2017 -0700

    mm/shmem: add hugetlbfs support to memfd_create()

Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
---
 man2/memfd_create.2 | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/man2/memfd_create.2 b/man2/memfd_create.2
index 4dfd1bb2d..b61254bb8 100644
--- a/man2/memfd_create.2
+++ b/man2/memfd_create.2
@@ -100,6 +100,33 @@ If this flag is not set, the initial set of seals will be
 meaning that no other seals can be set on the file.
 .\" FIXME Why is the MFD_ALLOW_SEALING behavior not simply the default?
 .\" Is it worth adding some text explaining this?
+.TP
+.BR MFD_HUGETLB " (since Linux 4.14)"
+The anonymous file will be created in the hugetlbfs filesystem using
+huge pages.  See the Linux kernel source file
+.I Documentation/vm/hugetlbpage.txt
+for more information about hugetlbfs.  The hugetlbfs filesystem does
+not support file sealing operations.  Therefore, specifying both
+.B MFD_HUGETLB
+and
+.B MFD_ALLOW_SEALING
+will result in an error
+.RB (EINVAL)
+being returned.
+
+.TP
+.BR MFD_HUGE_2MB ", " MFD_HUGE_1GB ", " "..."
+Used in conjunction with
+.B MFD_HUGETLB
+to select alternative hugetlb page sizes (respectively, 2 MB, 1 GB, ...)
+on systems that support multiple hugetlb page sizes.  Definitions for known
+huge page sizes are included in the header file
+.I <sys/memfd.h>.
+
+For details on encoding huge page sizes not included in the header file,
+see the discussion of the similarly named constants in
+.BR mmap (2).
+
 .PP
 Unused bits in
 .I flags
-- 
2.13.5

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

* [patch] memfd_create.2: Add description of MFD_HUGETLB (hugetlbfs) support
@ 2017-09-15 21:43 ` Mike Kravetz
  0 siblings, 0 replies; 6+ messages in thread
From: Mike Kravetz @ 2017-09-15 21:43 UTC (permalink / raw)
  To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w
  Cc: linux-man-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-api-u79uwXL29TY76Z2rM5mHXA, Michal Hocko, Hugh Dickins,
	Andrea Arcangeli, Kirill A . Shutemov, Mike Kravetz

hugetlbfs support for memfd_create was recently merged by Linus and
should be in the Linux 4.14 release.  To request hugetlbfs support
a new memfd_create flag (MFD_HUGETLB) was added.

This patch documents the following commit:

commit 749df87bd7bee5a79cef073f5d032ddb2b211de8
Author: Mike Kravetz <mike.kravetz-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Date:   Wed Sep 6 16:24:16 2017 -0700

    mm/shmem: add hugetlbfs support to memfd_create()

Signed-off-by: Mike Kravetz <mike.kravetz-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
 man2/memfd_create.2 | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/man2/memfd_create.2 b/man2/memfd_create.2
index 4dfd1bb2d..b61254bb8 100644
--- a/man2/memfd_create.2
+++ b/man2/memfd_create.2
@@ -100,6 +100,33 @@ If this flag is not set, the initial set of seals will be
 meaning that no other seals can be set on the file.
 .\" FIXME Why is the MFD_ALLOW_SEALING behavior not simply the default?
 .\" Is it worth adding some text explaining this?
+.TP
+.BR MFD_HUGETLB " (since Linux 4.14)"
+The anonymous file will be created in the hugetlbfs filesystem using
+huge pages.  See the Linux kernel source file
+.I Documentation/vm/hugetlbpage.txt
+for more information about hugetlbfs.  The hugetlbfs filesystem does
+not support file sealing operations.  Therefore, specifying both
+.B MFD_HUGETLB
+and
+.B MFD_ALLOW_SEALING
+will result in an error
+.RB (EINVAL)
+being returned.
+
+.TP
+.BR MFD_HUGE_2MB ", " MFD_HUGE_1GB ", " "..."
+Used in conjunction with
+.B MFD_HUGETLB
+to select alternative hugetlb page sizes (respectively, 2 MB, 1 GB, ...)
+on systems that support multiple hugetlb page sizes.  Definitions for known
+huge page sizes are included in the header file
+.I <sys/memfd.h>.
+
+For details on encoding huge page sizes not included in the header file,
+see the discussion of the similarly named constants in
+.BR mmap (2).
+
 .PP
 Unused bits in
 .I flags
-- 
2.13.5

--
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 related	[flat|nested] 6+ messages in thread

* Re: [patch] memfd_create.2: Add description of MFD_HUGETLB (hugetlbfs) support
  2017-09-15 21:43 ` Mike Kravetz
@ 2017-09-15 21:54   ` Mike Kravetz
  -1 siblings, 0 replies; 6+ messages in thread
From: Mike Kravetz @ 2017-09-15 21:54 UTC (permalink / raw)
  To: mtk.manpages
  Cc: linux-man, linux-kernel, linux-api, Michal Hocko, Hugh Dickins,
	Andrea Arcangeli, Kirill A . Shutemov, linux-mm

CC: linux-mm

On 09/15/2017 02:43 PM, Mike Kravetz wrote:
> hugetlbfs support for memfd_create was recently merged by Linus and
> should be in the Linux 4.14 release.  To request hugetlbfs support
> a new memfd_create flag (MFD_HUGETLB) was added.
> 
> This patch documents the following commit:
> 
> commit 749df87bd7bee5a79cef073f5d032ddb2b211de8
> Author: Mike Kravetz <mike.kravetz@oracle.com>
> Date:   Wed Sep 6 16:24:16 2017 -0700
> 
>     mm/shmem: add hugetlbfs support to memfd_create()
> 
> Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
> ---
>  man2/memfd_create.2 | 27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
> 
> diff --git a/man2/memfd_create.2 b/man2/memfd_create.2
> index 4dfd1bb2d..b61254bb8 100644
> --- a/man2/memfd_create.2
> +++ b/man2/memfd_create.2
> @@ -100,6 +100,33 @@ If this flag is not set, the initial set of seals will be
>  meaning that no other seals can be set on the file.
>  .\" FIXME Why is the MFD_ALLOW_SEALING behavior not simply the default?
>  .\" Is it worth adding some text explaining this?
> +.TP
> +.BR MFD_HUGETLB " (since Linux 4.14)"
> +The anonymous file will be created in the hugetlbfs filesystem using
> +huge pages.  See the Linux kernel source file
> +.I Documentation/vm/hugetlbpage.txt
> +for more information about hugetlbfs.  The hugetlbfs filesystem does
> +not support file sealing operations.  Therefore, specifying both
> +.B MFD_HUGETLB
> +and
> +.B MFD_ALLOW_SEALING
> +will result in an error
> +.RB (EINVAL)
> +being returned.
> +
> +.TP
> +.BR MFD_HUGE_2MB ", " MFD_HUGE_1GB ", " "..."
> +Used in conjunction with
> +.B MFD_HUGETLB
> +to select alternative hugetlb page sizes (respectively, 2 MB, 1 GB, ...)
> +on systems that support multiple hugetlb page sizes.  Definitions for known
> +huge page sizes are included in the header file
> +.I <sys/memfd.h>.
> +
> +For details on encoding huge page sizes not included in the header file,
> +see the discussion of the similarly named constants in
> +.BR mmap (2).
> +
>  .PP
>  Unused bits in
>  .I flags
> 

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

* Re: [patch] memfd_create.2: Add description of MFD_HUGETLB (hugetlbfs) support
@ 2017-09-15 21:54   ` Mike Kravetz
  0 siblings, 0 replies; 6+ messages in thread
From: Mike Kravetz @ 2017-09-15 21:54 UTC (permalink / raw)
  To: mtk.manpages
  Cc: linux-man, linux-kernel, linux-api, Michal Hocko, Hugh Dickins,
	Andrea Arcangeli, Kirill A . Shutemov, linux-mm

CC: linux-mm

On 09/15/2017 02:43 PM, Mike Kravetz wrote:
> hugetlbfs support for memfd_create was recently merged by Linus and
> should be in the Linux 4.14 release.  To request hugetlbfs support
> a new memfd_create flag (MFD_HUGETLB) was added.
> 
> This patch documents the following commit:
> 
> commit 749df87bd7bee5a79cef073f5d032ddb2b211de8
> Author: Mike Kravetz <mike.kravetz@oracle.com>
> Date:   Wed Sep 6 16:24:16 2017 -0700
> 
>     mm/shmem: add hugetlbfs support to memfd_create()
> 
> Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
> ---
>  man2/memfd_create.2 | 27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
> 
> diff --git a/man2/memfd_create.2 b/man2/memfd_create.2
> index 4dfd1bb2d..b61254bb8 100644
> --- a/man2/memfd_create.2
> +++ b/man2/memfd_create.2
> @@ -100,6 +100,33 @@ If this flag is not set, the initial set of seals will be
>  meaning that no other seals can be set on the file.
>  .\" FIXME Why is the MFD_ALLOW_SEALING behavior not simply the default?
>  .\" Is it worth adding some text explaining this?
> +.TP
> +.BR MFD_HUGETLB " (since Linux 4.14)"
> +The anonymous file will be created in the hugetlbfs filesystem using
> +huge pages.  See the Linux kernel source file
> +.I Documentation/vm/hugetlbpage.txt
> +for more information about hugetlbfs.  The hugetlbfs filesystem does
> +not support file sealing operations.  Therefore, specifying both
> +.B MFD_HUGETLB
> +and
> +.B MFD_ALLOW_SEALING
> +will result in an error
> +.RB (EINVAL)
> +being returned.
> +
> +.TP
> +.BR MFD_HUGE_2MB ", " MFD_HUGE_1GB ", " "..."
> +Used in conjunction with
> +.B MFD_HUGETLB
> +to select alternative hugetlb page sizes (respectively, 2 MB, 1 GB, ...)
> +on systems that support multiple hugetlb page sizes.  Definitions for known
> +huge page sizes are included in the header file
> +.I <sys/memfd.h>.
> +
> +For details on encoding huge page sizes not included in the header file,
> +see the discussion of the similarly named constants in
> +.BR mmap (2).
> +
>  .PP
>  Unused bits in
>  .I flags
> 

--
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] memfd_create.2: Add description of MFD_HUGETLB (hugetlbfs) support
  2017-09-15 21:43 ` Mike Kravetz
@ 2017-09-21 13:03   ` Michael Kerrisk (man-pages)
  -1 siblings, 0 replies; 6+ messages in thread
From: Michael Kerrisk (man-pages) @ 2017-09-21 13:03 UTC (permalink / raw)
  To: Mike Kravetz
  Cc: mtk.manpages, linux-man, linux-kernel, linux-api, Michal Hocko,
	Hugh Dickins, Andrea Arcangeli, Kirill A . Shutemov, linux-mm

Hi Mike,

On 09/15/2017 11:43 PM, Mike Kravetz wrote:
> hugetlbfs support for memfd_create was recently merged by Linus and
> should be in the Linux 4.14 release.  To request hugetlbfs support
> a new memfd_create flag (MFD_HUGETLB) was added.
> 
> This patch documents the following commit:
> 
> commit 749df87bd7bee5a79cef073f5d032ddb2b211de8
> Author: Mike Kravetz <mike.kravetz@oracle.com>
> Date:   Wed Sep 6 16:24:16 2017 -0700
> 
>     mm/shmem: add hugetlbfs support to memfd_create()

Thanks! I've applied this patch.

Cheers,

Michael

> 
> Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
> ---
>  man2/memfd_create.2 | 27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
> 
> diff --git a/man2/memfd_create.2 b/man2/memfd_create.2
> index 4dfd1bb2d..b61254bb8 100644
> --- a/man2/memfd_create.2
> +++ b/man2/memfd_create.2
> @@ -100,6 +100,33 @@ If this flag is not set, the initial set of seals will be
>  meaning that no other seals can be set on the file.
>  .\" FIXME Why is the MFD_ALLOW_SEALING behavior not simply the default?
>  .\" Is it worth adding some text explaining this?
> +.TP
> +.BR MFD_HUGETLB " (since Linux 4.14)"
> +The anonymous file will be created in the hugetlbfs filesystem using
> +huge pages.  See the Linux kernel source file
> +.I Documentation/vm/hugetlbpage.txt
> +for more information about hugetlbfs.  The hugetlbfs filesystem does
> +not support file sealing operations.  Therefore, specifying both
> +.B MFD_HUGETLB
> +and
> +.B MFD_ALLOW_SEALING
> +will result in an error
> +.RB (EINVAL)
> +being returned.
> +
> +.TP
> +.BR MFD_HUGE_2MB ", " MFD_HUGE_1GB ", " "..."
> +Used in conjunction with
> +.B MFD_HUGETLB
> +to select alternative hugetlb page sizes (respectively, 2 MB, 1 GB, ...)
> +on systems that support multiple hugetlb page sizes.  Definitions for known
> +huge page sizes are included in the header file
> +.I <sys/memfd.h>.
> +
> +For details on encoding huge page sizes not included in the header file,
> +see the discussion of the similarly named constants in
> +.BR mmap (2).
> +
>  .PP
>  Unused bits in
>  .I flags
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

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

* Re: [patch] memfd_create.2: Add description of MFD_HUGETLB (hugetlbfs) support
@ 2017-09-21 13:03   ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Kerrisk (man-pages) @ 2017-09-21 13:03 UTC (permalink / raw)
  To: Mike Kravetz
  Cc: mtk.manpages, linux-man, linux-kernel, linux-api, Michal Hocko,
	Hugh Dickins, Andrea Arcangeli, Kirill A . Shutemov, linux-mm

Hi Mike,

On 09/15/2017 11:43 PM, Mike Kravetz wrote:
> hugetlbfs support for memfd_create was recently merged by Linus and
> should be in the Linux 4.14 release.  To request hugetlbfs support
> a new memfd_create flag (MFD_HUGETLB) was added.
> 
> This patch documents the following commit:
> 
> commit 749df87bd7bee5a79cef073f5d032ddb2b211de8
> Author: Mike Kravetz <mike.kravetz@oracle.com>
> Date:   Wed Sep 6 16:24:16 2017 -0700
> 
>     mm/shmem: add hugetlbfs support to memfd_create()

Thanks! I've applied this patch.

Cheers,

Michael

> 
> Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
> ---
>  man2/memfd_create.2 | 27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
> 
> diff --git a/man2/memfd_create.2 b/man2/memfd_create.2
> index 4dfd1bb2d..b61254bb8 100644
> --- a/man2/memfd_create.2
> +++ b/man2/memfd_create.2
> @@ -100,6 +100,33 @@ If this flag is not set, the initial set of seals will be
>  meaning that no other seals can be set on the file.
>  .\" FIXME Why is the MFD_ALLOW_SEALING behavior not simply the default?
>  .\" Is it worth adding some text explaining this?
> +.TP
> +.BR MFD_HUGETLB " (since Linux 4.14)"
> +The anonymous file will be created in the hugetlbfs filesystem using
> +huge pages.  See the Linux kernel source file
> +.I Documentation/vm/hugetlbpage.txt
> +for more information about hugetlbfs.  The hugetlbfs filesystem does
> +not support file sealing operations.  Therefore, specifying both
> +.B MFD_HUGETLB
> +and
> +.B MFD_ALLOW_SEALING
> +will result in an error
> +.RB (EINVAL)
> +being returned.
> +
> +.TP
> +.BR MFD_HUGE_2MB ", " MFD_HUGE_1GB ", " "..."
> +Used in conjunction with
> +.B MFD_HUGETLB
> +to select alternative hugetlb page sizes (respectively, 2 MB, 1 GB, ...)
> +on systems that support multiple hugetlb page sizes.  Definitions for known
> +huge page sizes are included in the header file
> +.I <sys/memfd.h>.
> +
> +For details on encoding huge page sizes not included in the header file,
> +see the discussion of the similarly named constants in
> +.BR mmap (2).
> +
>  .PP
>  Unused bits in
>  .I flags
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

--
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

end of thread, other threads:[~2017-09-21 13:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-15 21:43 [patch] memfd_create.2: Add description of MFD_HUGETLB (hugetlbfs) support Mike Kravetz
2017-09-15 21:43 ` Mike Kravetz
2017-09-15 21:54 ` Mike Kravetz
2017-09-15 21:54   ` Mike Kravetz
2017-09-21 13:03 ` Michael Kerrisk (man-pages)
2017-09-21 13:03   ` Michael Kerrisk (man-pages)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.