All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] man2/set_mempolicy.2: Add mode flag MPOL_F_NUMA_BALANCING
@ 2021-03-19 23:57 Alejandro Colomar
  2021-04-04 20:08 ` Michael Kerrisk (man-pages)
  0 siblings, 1 reply; 5+ messages in thread
From: Alejandro Colomar @ 2021-03-19 23:57 UTC (permalink / raw)
  To: mtk.manpages; +Cc: Huang Ying, linux-man, Alejandro Colomar

From: Huang Ying <ying.huang@intel.com>

In Linux kernel 5.12, a new mode flag MPOL_F_NUMA_BALANCING is added
to set_mempolicy() to optimize the page placement among the NUMA nodes
with the NUMA balancing mechanism even if the memory of the
applications are bound with MPOL_BIND.  This patch update the man page
for the new mode flag.

Related kernel commits:
bda420b985054a3badafef23807c4b4fa38a3dff

Signed-off-by: "Huang, Ying" <ying.huang@intel.com>
Cc: "Michael Kerrisk" <mtk.manpages@gmail.com>
[ alx: srcfix ]
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
 man2/set_mempolicy.2 | 33 +++++++++++++++++++++++++++------
 1 file changed, 27 insertions(+), 6 deletions(-)

diff --git a/man2/set_mempolicy.2 b/man2/set_mempolicy.2
index 6e695fb13..746858720 100644
--- a/man2/set_mempolicy.2
+++ b/man2/set_mempolicy.2
@@ -98,6 +98,27 @@ The supported
 .I "mode flags"
 are:
 .TP
+.BR MPOL_F_NUMA_BALANCING " (since Linux 5.12)"
+When
+.I mode
+is
+.BR MPOL_BIND ,
+enable the kernel NUMA balancing for the task if it is supported by the kernel.
+If the flag isn't supported by the kernel, or is used with
+.I mode
+other than
+.BR MPOL_BIND ,
+\-1 is returned and
+.I errno
+is set to
+.BR EINVAL .
+.TP
+.BR MPOL_F_RELATIVE_NODES " (since Linux 2.6.26)"
+A nonempty
+.I nodemask
+specifies node IDs that are relative to the
+set of node IDs allowed by the process's current cpuset.
+.TP
 .BR MPOL_F_STATIC_NODES " (since Linux 2.6.26)"
 A nonempty
 .I nodemask
@@ -107,12 +128,6 @@ Linux will not remap the
 when the process moves to a different cpuset context,
 nor when the set of nodes allowed by the process's
 current cpuset context changes.
-.TP
-.BR MPOL_F_RELATIVE_NODES " (since Linux 2.6.26)"
-A nonempty
-.I nodemask
-specifies node IDs that are relative to the set of
-node IDs allowed by the process's current cpuset.
 .PP
 .I nodemask
 points to a bit mask of node IDs that contains up to
@@ -293,6 +308,12 @@ argument specified both
 .B MPOL_F_STATIC_NODES
 and
 .BR MPOL_F_RELATIVE_NODES .
+Or, the
+.B MPOL_F_NUMA_BALANCING
+isn't supported by the kernel, or is used with
+.I mode
+other than
+.BR MPOL_BIND .
 .TP
 .B ENOMEM
 Insufficient kernel memory was available.
-- 
2.30.1


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

* Re: [PATCH] man2/set_mempolicy.2: Add mode flag MPOL_F_NUMA_BALANCING
  2021-03-19 23:57 [PATCH] man2/set_mempolicy.2: Add mode flag MPOL_F_NUMA_BALANCING Alejandro Colomar
@ 2021-04-04 20:08 ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Kerrisk (man-pages) @ 2021-04-04 20:08 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: mtk.manpages, Huang Ying, linux-man

Hi Alex,

On 3/20/21 12:57 AM, Alejandro Colomar wrote:
> From: Huang Ying <ying.huang@intel.com>
> 
> In Linux kernel 5.12, a new mode flag MPOL_F_NUMA_BALANCING is added
> to set_mempolicy() to optimize the page placement among the NUMA nodes
> with the NUMA balancing mechanism even if the memory of the
> applications are bound with MPOL_BIND.  This patch update the man page
> for the new mode flag.
> 
> Related kernel commits:
> bda420b985054a3badafef23807c4b4fa38a3dff

Thanks. Patch applied.

Cheers,

Michael

> 
> Signed-off-by: "Huang, Ying" <ying.huang@intel.com>
> Cc: "Michael Kerrisk" <mtk.manpages@gmail.com>
> [ alx: srcfix ]
> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
> ---
>  man2/set_mempolicy.2 | 33 +++++++++++++++++++++++++++------
>  1 file changed, 27 insertions(+), 6 deletions(-)
> 
> diff --git a/man2/set_mempolicy.2 b/man2/set_mempolicy.2
> index 6e695fb13..746858720 100644
> --- a/man2/set_mempolicy.2
> +++ b/man2/set_mempolicy.2
> @@ -98,6 +98,27 @@ The supported
>  .I "mode flags"
>  are:
>  .TP
> +.BR MPOL_F_NUMA_BALANCING " (since Linux 5.12)"
> +When
> +.I mode
> +is
> +.BR MPOL_BIND ,
> +enable the kernel NUMA balancing for the task if it is supported by the kernel.
> +If the flag isn't supported by the kernel, or is used with
> +.I mode
> +other than
> +.BR MPOL_BIND ,
> +\-1 is returned and
> +.I errno
> +is set to
> +.BR EINVAL .
> +.TP
> +.BR MPOL_F_RELATIVE_NODES " (since Linux 2.6.26)"
> +A nonempty
> +.I nodemask
> +specifies node IDs that are relative to the
> +set of node IDs allowed by the process's current cpuset.
> +.TP
>  .BR MPOL_F_STATIC_NODES " (since Linux 2.6.26)"
>  A nonempty
>  .I nodemask
> @@ -107,12 +128,6 @@ Linux will not remap the
>  when the process moves to a different cpuset context,
>  nor when the set of nodes allowed by the process's
>  current cpuset context changes.
> -.TP
> -.BR MPOL_F_RELATIVE_NODES " (since Linux 2.6.26)"
> -A nonempty
> -.I nodemask
> -specifies node IDs that are relative to the set of
> -node IDs allowed by the process's current cpuset.
>  .PP
>  .I nodemask
>  points to a bit mask of node IDs that contains up to
> @@ -293,6 +308,12 @@ argument specified both
>  .B MPOL_F_STATIC_NODES
>  and
>  .BR MPOL_F_RELATIVE_NODES .
> +Or, the
> +.B MPOL_F_NUMA_BALANCING
> +isn't supported by the kernel, or is used with
> +.I mode
> +other than
> +.BR MPOL_BIND .
>  .TP
>  .B ENOMEM
>  Insufficient kernel memory was available.
> 


-- 
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] 5+ messages in thread

* Re: [PATCH] man2/set_mempolicy.2: Add mode flag MPOL_F_NUMA_BALANCING
  2021-03-01  2:45 Huang Ying
  2021-03-10  1:42 ` Huang, Ying
@ 2021-03-10 18:42 ` Alejandro Colomar (man-pages)
  1 sibling, 0 replies; 5+ messages in thread
From: Alejandro Colomar (man-pages) @ 2021-03-10 18:42 UTC (permalink / raw)
  To: Huang Ying; +Cc: Michael Kerrisk, linux-man, Mel Gorman

Hi Huang Ying,

On 3/1/21 3:45 AM, Huang Ying wrote:
> In Linux kernel 5.12, a new mode flag MPOL_F_NUMA_BALANCING is added
> to set_mempolicy() to optimize the page placement among the NUMA nodes
> with the NUMA balancing mechanism even if the memory of the
> applications are bound with MPOL_BIND.  This patch update the man page
> for the new mode flag.
> 
> Related kernel commits:
> bda420b985054a3badafef23807c4b4fa38a3dff
> 
> Signed-off-by: "Huang, Ying" <ying.huang@intel.com>
> Cc: "Alejandro Colomar" <alx.manpages@gmail.com>
> Cc: "Michael Kerrisk" <mtk.manpages@gmail.com>

Sorry for the delay.  Patch applied.

Thanks!

Alex

> ---
>   man2/set_mempolicy.2 | 34 ++++++++++++++++++++++++++++------
>   1 file changed, 28 insertions(+), 6 deletions(-)
> 
> diff --git a/man2/set_mempolicy.2 b/man2/set_mempolicy.2
> index 6e695fb13..cd543667f 100644
> --- a/man2/set_mempolicy.2
> +++ b/man2/set_mempolicy.2
> @@ -98,6 +98,28 @@ The supported
>   .I "mode flags"
>   are:
>   .TP
> +.BR MPOL_F_NUMA_BALANCING " (since Linux 5.12)"
> +When
> +.I mode
> +is
> +.BR MPOL_BIND ,
> +enable the kernel NUMA balancing for the task if it is supported by
> +the kernel.
> +If the flag isn't supported by the kernel, or is used with
> +.I mode
> +other than
> +.BR MPOL_BIND ,
> +\-1 is returned and
> +.I errno
> +is set to
> +.BR EINVAL .
> +.TP
> +.BR MPOL_F_RELATIVE_NODES " (since Linux 2.6.26)"
> +A nonempty
> +.I nodemask
> +specifies node IDs that are relative to the set of
> +node IDs allowed by the process's current cpuset.
> +.TP
>   .BR MPOL_F_STATIC_NODES " (since Linux 2.6.26)"
>   A nonempty
>   .I nodemask
> @@ -107,12 +129,6 @@ Linux will not remap the
>   when the process moves to a different cpuset context,
>   nor when the set of nodes allowed by the process's
>   current cpuset context changes.
> -.TP
> -.BR MPOL_F_RELATIVE_NODES " (since Linux 2.6.26)"
> -A nonempty
> -.I nodemask
> -specifies node IDs that are relative to the set of
> -node IDs allowed by the process's current cpuset.
>   .PP
>   .I nodemask
>   points to a bit mask of node IDs that contains up to
> @@ -293,6 +309,12 @@ argument specified both
>   .B MPOL_F_STATIC_NODES
>   and
>   .BR MPOL_F_RELATIVE_NODES .
> +Or, the
> +.B MPOL_F_NUMA_BALANCING
> +isn't supported by the kernel, or is used with
> +.I mode
> +other than
> +.BR MPOL_BIND .
>   .TP
>   .B ENOMEM
>   Insufficient kernel memory was available.
> 

-- 
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/

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

* Re: [PATCH] man2/set_mempolicy.2: Add mode flag MPOL_F_NUMA_BALANCING
  2021-03-01  2:45 Huang Ying
@ 2021-03-10  1:42 ` Huang, Ying
  2021-03-10 18:42 ` Alejandro Colomar (man-pages)
  1 sibling, 0 replies; 5+ messages in thread
From: Huang, Ying @ 2021-03-10  1:42 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: Michael Kerrisk, linux-man, Mel Gorman

Huang Ying <ying.huang@intel.com> writes:

> In Linux kernel 5.12, a new mode flag MPOL_F_NUMA_BALANCING is added
> to set_mempolicy() to optimize the page placement among the NUMA nodes
> with the NUMA balancing mechanism even if the memory of the
> applications are bound with MPOL_BIND.  This patch update the man page
> for the new mode flag.
>
> Related kernel commits:
> bda420b985054a3badafef23807c4b4fa38a3dff

Hi, Colomar,

Do you have time to take a look at this patch?  It has been reviewed in
the following thread,

https://lore.kernel.org/lkml/20210120061235.148637-3-ying.huang@intel.com/

Now the corresponding kernel change has been merged by upstream kernel.
Do you have further comments?

Best Regards,
Huang, Ying

> Signed-off-by: "Huang, Ying" <ying.huang@intel.com>
> Cc: "Alejandro Colomar" <alx.manpages@gmail.com>
> Cc: "Michael Kerrisk" <mtk.manpages@gmail.com>
> ---
>  man2/set_mempolicy.2 | 34 ++++++++++++++++++++++++++++------
>  1 file changed, 28 insertions(+), 6 deletions(-)
>
> diff --git a/man2/set_mempolicy.2 b/man2/set_mempolicy.2
> index 6e695fb13..cd543667f 100644
> --- a/man2/set_mempolicy.2
> +++ b/man2/set_mempolicy.2
> @@ -98,6 +98,28 @@ The supported
>  .I "mode flags"
>  are:
>  .TP
> +.BR MPOL_F_NUMA_BALANCING " (since Linux 5.12)"
> +When
> +.I mode
> +is
> +.BR MPOL_BIND ,
> +enable the kernel NUMA balancing for the task if it is supported by
> +the kernel.
> +If the flag isn't supported by the kernel, or is used with
> +.I mode
> +other than
> +.BR MPOL_BIND ,
> +\-1 is returned and
> +.I errno
> +is set to
> +.BR EINVAL .
> +.TP
> +.BR MPOL_F_RELATIVE_NODES " (since Linux 2.6.26)"
> +A nonempty
> +.I nodemask
> +specifies node IDs that are relative to the set of
> +node IDs allowed by the process's current cpuset.
> +.TP
>  .BR MPOL_F_STATIC_NODES " (since Linux 2.6.26)"
>  A nonempty
>  .I nodemask
> @@ -107,12 +129,6 @@ Linux will not remap the
>  when the process moves to a different cpuset context,
>  nor when the set of nodes allowed by the process's
>  current cpuset context changes.
> -.TP
> -.BR MPOL_F_RELATIVE_NODES " (since Linux 2.6.26)"
> -A nonempty
> -.I nodemask
> -specifies node IDs that are relative to the set of
> -node IDs allowed by the process's current cpuset.
>  .PP
>  .I nodemask
>  points to a bit mask of node IDs that contains up to
> @@ -293,6 +309,12 @@ argument specified both
>  .B MPOL_F_STATIC_NODES
>  and
>  .BR MPOL_F_RELATIVE_NODES .
> +Or, the
> +.B MPOL_F_NUMA_BALANCING
> +isn't supported by the kernel, or is used with
> +.I mode
> +other than
> +.BR MPOL_BIND .
>  .TP
>  .B ENOMEM
>  Insufficient kernel memory was available.

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

* [PATCH] man2/set_mempolicy.2: Add mode flag MPOL_F_NUMA_BALANCING
@ 2021-03-01  2:45 Huang Ying
  2021-03-10  1:42 ` Huang, Ying
  2021-03-10 18:42 ` Alejandro Colomar (man-pages)
  0 siblings, 2 replies; 5+ messages in thread
From: Huang Ying @ 2021-03-01  2:45 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: Michael Kerrisk, linux-man, Mel Gorman, Huang Ying

In Linux kernel 5.12, a new mode flag MPOL_F_NUMA_BALANCING is added
to set_mempolicy() to optimize the page placement among the NUMA nodes
with the NUMA balancing mechanism even if the memory of the
applications are bound with MPOL_BIND.  This patch update the man page
for the new mode flag.

Related kernel commits:
bda420b985054a3badafef23807c4b4fa38a3dff

Signed-off-by: "Huang, Ying" <ying.huang@intel.com>
Cc: "Alejandro Colomar" <alx.manpages@gmail.com>
Cc: "Michael Kerrisk" <mtk.manpages@gmail.com>
---
 man2/set_mempolicy.2 | 34 ++++++++++++++++++++++++++++------
 1 file changed, 28 insertions(+), 6 deletions(-)

diff --git a/man2/set_mempolicy.2 b/man2/set_mempolicy.2
index 6e695fb13..cd543667f 100644
--- a/man2/set_mempolicy.2
+++ b/man2/set_mempolicy.2
@@ -98,6 +98,28 @@ The supported
 .I "mode flags"
 are:
 .TP
+.BR MPOL_F_NUMA_BALANCING " (since Linux 5.12)"
+When
+.I mode
+is
+.BR MPOL_BIND ,
+enable the kernel NUMA balancing for the task if it is supported by
+the kernel.
+If the flag isn't supported by the kernel, or is used with
+.I mode
+other than
+.BR MPOL_BIND ,
+\-1 is returned and
+.I errno
+is set to
+.BR EINVAL .
+.TP
+.BR MPOL_F_RELATIVE_NODES " (since Linux 2.6.26)"
+A nonempty
+.I nodemask
+specifies node IDs that are relative to the set of
+node IDs allowed by the process's current cpuset.
+.TP
 .BR MPOL_F_STATIC_NODES " (since Linux 2.6.26)"
 A nonempty
 .I nodemask
@@ -107,12 +129,6 @@ Linux will not remap the
 when the process moves to a different cpuset context,
 nor when the set of nodes allowed by the process's
 current cpuset context changes.
-.TP
-.BR MPOL_F_RELATIVE_NODES " (since Linux 2.6.26)"
-A nonempty
-.I nodemask
-specifies node IDs that are relative to the set of
-node IDs allowed by the process's current cpuset.
 .PP
 .I nodemask
 points to a bit mask of node IDs that contains up to
@@ -293,6 +309,12 @@ argument specified both
 .B MPOL_F_STATIC_NODES
 and
 .BR MPOL_F_RELATIVE_NODES .
+Or, the
+.B MPOL_F_NUMA_BALANCING
+isn't supported by the kernel, or is used with
+.I mode
+other than
+.BR MPOL_BIND .
 .TP
 .B ENOMEM
 Insufficient kernel memory was available.
-- 
2.30.1


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

end of thread, other threads:[~2021-04-04 20:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-19 23:57 [PATCH] man2/set_mempolicy.2: Add mode flag MPOL_F_NUMA_BALANCING Alejandro Colomar
2021-04-04 20:08 ` Michael Kerrisk (man-pages)
  -- strict thread matches above, loose matches on Subject: below --
2021-03-01  2:45 Huang Ying
2021-03-10  1:42 ` Huang, Ying
2021-03-10 18:42 ` Alejandro Colomar (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.