* [PATCH v2 1/5] man/man2/prctl.2, PR_FUTEX_HASH_SET_SLOTS.2const: Document PR_FUTEX_HASH_SET_SLOTS
2025-09-15 14:13 [PATCH v2 0/5] sched.7 and small futex.2 updates Sebastian Andrzej Siewior
@ 2025-09-15 14:13 ` Sebastian Andrzej Siewior
2025-10-15 21:29 ` Alejandro Colomar
2025-09-15 14:13 ` [PATCH v2 2/5] man/man7/sched.7: Update the real-time section Sebastian Andrzej Siewior
` (3 subsequent siblings)
4 siblings, 1 reply; 12+ messages in thread
From: Sebastian Andrzej Siewior @ 2025-09-15 14:13 UTC (permalink / raw)
To: linux-kernel, linux-man
Cc: Alejandro Colomar, André Almeida, Darren Hart,
Davidlohr Bueso, Ingo Molnar, Juri Lelli, Peter Zijlstra,
Thomas Gleixner, Valentin Schneider, Waiman Long,
Sebastian Andrzej Siewior
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
man/man2const/PR_FUTEX_HASH_SET_SLOTS.2const | 67 ++++++++++++++++++++
1 file changed, 67 insertions(+)
create mode 100644 man/man2const/PR_FUTEX_HASH_SET_SLOTS.2const
diff --git a/man/man2const/PR_FUTEX_HASH_SET_SLOTS.2const b/man/man2const/PR_FUTEX_HASH_SET_SLOTS.2const
new file mode 100644
index 0000000000000..1605c18c6985b
--- /dev/null
+++ b/man/man2const/PR_FUTEX_HASH_SET_SLOTS.2const
@@ -0,0 +1,67 @@
+.\" Copyright, the authors of the Linux man-pages project
+.\"
+.\" SPDX-License-Identifier: Linux-man-pages-copyleft
+.\"
+.TH PR_FUTEX_HASH_SET_SLOTS 2const (date) "Linux man-pages (unreleased)"
+.SH NAME
+PR_FUTEX_HASH_SET_SLOTS
+\-
+set the size of the private hash
+.SH LIBRARY
+Standard C library
+.RI ( libc ,\~ \-lc )
+.SH SYNOPSIS
+.nf
+.BR "#include <linux/prctl.h>" " /* Definition of " PR_* " constants */"
+.B #include <sys/prctl.h>
+.P
+.B int prctl(PR_FUTEX_HASH, PR_FUTEX_HASH_SET_SLOTS,
+.BI " unsigned long " size ", unsigned long " flags ");
+.fi
+.SH DESCRIPTION
+Set the number of slots to use for the private hash.
+.TP
+.I size
+Specify the size of private hash to allocate.
+.RS
+.TP
+.I 0
+Use the global hash.
+This is the behaviour used before 6.17.
+.TP
+.I >0
+Specify the number of slots to allocate.
+The value must be power of two, and the lowest possible value is 2.
+The upper limit depends on the available memory in the system.
+Each slot requires 64 bytes of memory.
+Kernels compiled with
+.I CONFIG_PROVE_LOCKING
+will consume more than that.
+.RE
+.TP
+.I flags
+.RS
+The argument must be 0.
+.SH RETURN VALUE
+On success,
+0 is returned.
+On error, \-1 is returned, and
+.I errno
+is set to indicate the error.
+.SH ERRORS
+.TP
+.B EINVAL
+An argument is invalid.
+.TP
+.B ENOMEM
+Failed to allocate memory.
+.TP
+.B EBUSY
+The global hash is in use and can not be changed.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 6.17.
+.SH SEE ALSO
+.BR prctl (2),
+.BR PR_FUTEX_HASH (2const)
--
2.51.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH v2 1/5] man/man2/prctl.2, PR_FUTEX_HASH_SET_SLOTS.2const: Document PR_FUTEX_HASH_SET_SLOTS
2025-09-15 14:13 ` [PATCH v2 1/5] man/man2/prctl.2, PR_FUTEX_HASH_SET_SLOTS.2const: Document PR_FUTEX_HASH_SET_SLOTS Sebastian Andrzej Siewior
@ 2025-10-15 21:29 ` Alejandro Colomar
2025-10-16 6:23 ` Sebastian Andrzej Siewior
0 siblings, 1 reply; 12+ messages in thread
From: Alejandro Colomar @ 2025-10-15 21:29 UTC (permalink / raw)
To: Sebastian Andrzej Siewior
Cc: linux-kernel, linux-man, André Almeida, Darren Hart,
Davidlohr Bueso, Ingo Molnar, Juri Lelli, Peter Zijlstra,
Thomas Gleixner, Valentin Schneider, Waiman Long
[-- Attachment #1: Type: text/plain, Size: 3073 bytes --]
Hi Sebastian,
Sorry for taking a month to reply.
On Mon, Sep 15, 2025 at 04:13:01PM +0200, Sebastian Andrzej Siewior wrote:
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Thanks! I've applied the patch, and amended it with the following
change:
diff --git c/man/man2const/PR_FUTEX_HASH_SET_SLOTS.2const i/man/man2const/PR_FUTEX_HASH_SET_SLOTS.2const
index 1605c18c6..dfd97540c 100644
--- c/man/man2const/PR_FUTEX_HASH_SET_SLOTS.2const
+++ i/man/man2const/PR_FUTEX_HASH_SET_SLOTS.2const
@@ -27,7 +27,7 @@ .SH DESCRIPTION
.TP
.I 0
Use the global hash.
-This is the behaviour used before 6.17.
+This is the behaviour used before Linux 6.17.
.TP
.I >0
Specify the number of slots to allocate.
Have a lovely night!
Alex
> ---
> man/man2const/PR_FUTEX_HASH_SET_SLOTS.2const | 67 ++++++++++++++++++++
> 1 file changed, 67 insertions(+)
> create mode 100644 man/man2const/PR_FUTEX_HASH_SET_SLOTS.2const
>
> diff --git a/man/man2const/PR_FUTEX_HASH_SET_SLOTS.2const b/man/man2const/PR_FUTEX_HASH_SET_SLOTS.2const
> new file mode 100644
> index 0000000000000..1605c18c6985b
> --- /dev/null
> +++ b/man/man2const/PR_FUTEX_HASH_SET_SLOTS.2const
> @@ -0,0 +1,67 @@
> +.\" Copyright, the authors of the Linux man-pages project
> +.\"
> +.\" SPDX-License-Identifier: Linux-man-pages-copyleft
> +.\"
> +.TH PR_FUTEX_HASH_SET_SLOTS 2const (date) "Linux man-pages (unreleased)"
> +.SH NAME
> +PR_FUTEX_HASH_SET_SLOTS
> +\-
> +set the size of the private hash
> +.SH LIBRARY
> +Standard C library
> +.RI ( libc ,\~ \-lc )
> +.SH SYNOPSIS
> +.nf
> +.BR "#include <linux/prctl.h>" " /* Definition of " PR_* " constants */"
> +.B #include <sys/prctl.h>
> +.P
> +.B int prctl(PR_FUTEX_HASH, PR_FUTEX_HASH_SET_SLOTS,
> +.BI " unsigned long " size ", unsigned long " flags ");
> +.fi
> +.SH DESCRIPTION
> +Set the number of slots to use for the private hash.
> +.TP
> +.I size
> +Specify the size of private hash to allocate.
> +.RS
> +.TP
> +.I 0
> +Use the global hash.
> +This is the behaviour used before 6.17.
> +.TP
> +.I >0
> +Specify the number of slots to allocate.
> +The value must be power of two, and the lowest possible value is 2.
> +The upper limit depends on the available memory in the system.
> +Each slot requires 64 bytes of memory.
> +Kernels compiled with
> +.I CONFIG_PROVE_LOCKING
> +will consume more than that.
> +.RE
> +.TP
> +.I flags
> +.RS
> +The argument must be 0.
> +.SH RETURN VALUE
> +On success,
> +0 is returned.
> +On error, \-1 is returned, and
> +.I errno
> +is set to indicate the error.
> +.SH ERRORS
> +.TP
> +.B EINVAL
> +An argument is invalid.
> +.TP
> +.B ENOMEM
> +Failed to allocate memory.
> +.TP
> +.B EBUSY
> +The global hash is in use and can not be changed.
> +.SH STANDARDS
> +Linux.
> +.SH HISTORY
> +Linux 6.17.
> +.SH SEE ALSO
> +.BR prctl (2),
> +.BR PR_FUTEX_HASH (2const)
> --
> 2.51.0
>
--
<https://www.alejandro-colomar.es>
Use port 80 (that is, <...:80/>).
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 1/5] man/man2/prctl.2, PR_FUTEX_HASH_SET_SLOTS.2const: Document PR_FUTEX_HASH_SET_SLOTS
2025-10-15 21:29 ` Alejandro Colomar
@ 2025-10-16 6:23 ` Sebastian Andrzej Siewior
0 siblings, 0 replies; 12+ messages in thread
From: Sebastian Andrzej Siewior @ 2025-10-16 6:23 UTC (permalink / raw)
To: Alejandro Colomar
Cc: linux-kernel, linux-man, André Almeida, Darren Hart,
Davidlohr Bueso, Ingo Molnar, Juri Lelli, Peter Zijlstra,
Thomas Gleixner, Valentin Schneider, Waiman Long
On 2025-10-15 23:29:39 [+0200], Alejandro Colomar wrote:
> Hi Sebastian,
Hi Alejandro,
> Sorry for taking a month to reply.
No worries, thank you.
Sebastian
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 2/5] man/man7/sched.7: Update the real-time section
2025-09-15 14:13 [PATCH v2 0/5] sched.7 and small futex.2 updates Sebastian Andrzej Siewior
2025-09-15 14:13 ` [PATCH v2 1/5] man/man2/prctl.2, PR_FUTEX_HASH_SET_SLOTS.2const: Document PR_FUTEX_HASH_SET_SLOTS Sebastian Andrzej Siewior
@ 2025-09-15 14:13 ` Sebastian Andrzej Siewior
2025-10-15 21:40 ` Alejandro Colomar
2025-09-15 14:13 ` [PATCH v2 3/5] man/man7/sched.7: Update the documentation references Sebastian Andrzej Siewior
` (2 subsequent siblings)
4 siblings, 1 reply; 12+ messages in thread
From: Sebastian Andrzej Siewior @ 2025-09-15 14:13 UTC (permalink / raw)
To: linux-kernel, linux-man
Cc: Alejandro Colomar, André Almeida, Darren Hart,
Davidlohr Bueso, Ingo Molnar, Juri Lelli, Peter Zijlstra,
Thomas Gleixner, Valentin Schneider, Waiman Long,
Sebastian Andrzej Siewior
Update the outdated information:
- The PREEMPT_RT patch is merged. The patch continues to exist (as of
now) but is not mandatory.
- The patch can be still downloaded but most people use the git tree
these days. Add a reference to it.
- CONFIG_PREEMPT_DESKTOP was never thing as far as I remember. It was
always CONFIG_PREEMPT and its description referred to "low latency
desktop".
- Within the PREEMPT-RT patch there was a brief window which introduced
PREEMPT_RT_BASE and PREEMPT_RT_FULL. I am going to ignore this.
- The introduction of PREEMPT_LAZY in 6.13 moved PREEMPT_RT from a
preemption model to an option.
- The mentioned wiki is deprecated. Update the URL to the new one.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
man/man7/sched.7 | 58 ++++++++++++++++++++++++++++++++++--------------
1 file changed, 41 insertions(+), 17 deletions(-)
diff --git a/man/man7/sched.7 b/man/man7/sched.7
index 3299c21dc1ad8..db7753c9e912c 100644
--- a/man/man7/sched.7
+++ b/man/man7/sched.7
@@ -933,16 +933,12 @@ the following to modify the autogroup nice value for
.EE
.in
.SS Real-time features in the mainline Linux kernel
-.\" FIXME . Probably this text will need some minor tweaking
-.\" ask Carsten Emde about this.
+.\" The archaeologist knows about v2.6.9-mm1-V0.1-realtime-preempt
Since Linux 2.6.18, Linux is gradually
becoming equipped with real-time capabilities,
most of which are derived from the former
.I realtime\-preempt
patch set.
-Until the patches have been completely merged into the
-mainline kernel,
-they must be installed to achieve the best real-time performance.
These patches are named:
.P
.in +4n
@@ -953,24 +949,52 @@ they must be installed to achieve the best real-time performance.
.P
and can be downloaded from
.UR http://www.kernel.org\:/pub\:/linux\:/kernel\:/projects\:/rt/
+.UE
+or cloned from a git tree
+.UR https://git.kernel.org\:/pub\:/scm\:/linux\:/kernel\:/git\:/rt\:/linux-stable-rt.git
.UE .
+The individual releases are maintained as long as
+the matching LTS kernel is maintained.
.P
-Without the patches and prior to their full inclusion into the mainline
-kernel, the kernel configuration offers only the three preemption classes
+Since 6.12 it possible to enable the real-time preemption
+without the need for any patches.
+The
+.I realtime\-patch
+continues to exist and contains support
+for not yet integrated architectures,
+drivers and features that are in development.
+.P
+Since 6.13 real-time becomes an option
+and not a preemption model.
+With this change,
+the following preemption models are available:
.BR CONFIG_PREEMPT_NONE ,
.BR CONFIG_PREEMPT_VOLUNTARY ,
+.BR CONFIG_PREEMPT ,
and
-.B CONFIG_PREEMPT_DESKTOP
-which respectively provide no, some, and considerable
-reduction of the worst-case scheduling latency.
-.P
-With the patches applied or after their full inclusion into the mainline
-kernel, the additional configuration item
+.BR CONFIG_PREEMPT_LAZY .
+The real-time capabilities can be enabled with the option
.B CONFIG_PREEMPT_RT
-becomes available.
-If this is selected, Linux is transformed into a regular
+and the preemption model be set to either
+.B CONFIG_PREEMPT
+or
+.BR CONFIG_PREEMPT_LAZY .
+The latter model is less eager to preempt
+.B SCHED_NORMAL
+tasks in an attempt to reduce lock holder preemption.
+It does not affect real-time tasks.
+.P
+With
+.B CONFIG_PREEMPT_RT
+enabled,
+Linux is transformed into a regular
real-time operating system.
-The FIFO and RR scheduling policies are then used to run a thread
+The
+.BR SCHED_FIFO ,
+.BR SCHED_RR ,
+and
+.B SCHED_DEADLINE
+scheduling policies are then used to run a thread
with true real-time priority and a minimum worst-case scheduling latency.
.SH NOTES
The
@@ -1032,5 +1056,5 @@ and
.I \%Documentation/\:scheduler/\:sched\-nice\-design\:.txt
.P
Worth looking at:
-.UR http://rt.wiki.kernel.org/\:index.php
+.UR https://wiki.linuxfoundation.org/\:realtime/\:start
.UE
--
2.51.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH v2 2/5] man/man7/sched.7: Update the real-time section
2025-09-15 14:13 ` [PATCH v2 2/5] man/man7/sched.7: Update the real-time section Sebastian Andrzej Siewior
@ 2025-10-15 21:40 ` Alejandro Colomar
0 siblings, 0 replies; 12+ messages in thread
From: Alejandro Colomar @ 2025-10-15 21:40 UTC (permalink / raw)
To: Sebastian Andrzej Siewior
Cc: linux-kernel, linux-man, André Almeida, Darren Hart,
Davidlohr Bueso, Ingo Molnar, Juri Lelli, Peter Zijlstra,
Thomas Gleixner, Valentin Schneider, Waiman Long
[-- Attachment #1: Type: text/plain, Size: 6326 bytes --]
Hi Sebastian,
On Mon, Sep 15, 2025 at 04:13:02PM +0200, Sebastian Andrzej Siewior wrote:
> Update the outdated information:
> - The PREEMPT_RT patch is merged. The patch continues to exist (as of
> now) but is not mandatory.
> - The patch can be still downloaded but most people use the git tree
> these days. Add a reference to it.
> - CONFIG_PREEMPT_DESKTOP was never thing as far as I remember. It was
> always CONFIG_PREEMPT and its description referred to "low latency
> desktop".
> - Within the PREEMPT-RT patch there was a brief window which introduced
> PREEMPT_RT_BASE and PREEMPT_RT_FULL. I am going to ignore this.
> - The introduction of PREEMPT_LAZY in 6.13 moved PREEMPT_RT from a
> preemption model to an option.
> - The mentioned wiki is deprecated. Update the URL to the new one.
>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Thanks! I've applied the patch, with the following amendment:
diff --git i/man/man7/sched.7 w/man/man7/sched.7
index 51300d611..9622c1824 100644
--- i/man/man7/sched.7
+++ w/man/man7/sched.7
@@ -960,18 +960,18 @@ .SS Real-time features in the mainline Linux kernel
or cloned from a git tree
.UR https://git.kernel.org\:/pub\:/scm\:/linux\:/kernel\:/git\:/rt\:/linux-stable-rt.git
.UE .
-The individual releases are maintained as long as
-the matching LTS kernel is maintained.
+The individual releases are maintained
+as long as the matching LTS kernel is maintained.
.P
-Since 6.12 it possible to enable the real-time preemption
+Since Linux 6.12 it possible to enable the real-time preemption
without the need for any patches.
The
.I realtime\-patch
continues to exist and contains support
-for not yet integrated architectures,
-drivers and features that are in development.
+for not-yet-integrated architectures,
+drivers, and features that are in development.
.P
-Since 6.13 real-time becomes an option
+Since Linux 6.13 real-time became an option
and not a preemption model.
With this change,
the following preemption models are available:
@@ -982,13 +982,13 @@ .SS Real-time features in the mainline Linux kernel
.BR CONFIG_PREEMPT_LAZY .
The real-time capabilities can be enabled with the option
.B CONFIG_PREEMPT_RT
-and the preemption model be set to either
+and the preemption model can be set to either
.B CONFIG_PREEMPT
or
.BR CONFIG_PREEMPT_LAZY .
The latter model is less eager to preempt
.B SCHED_NORMAL
-tasks in an attempt to reduce lock holder preemption.
+tasks in an attempt to reduce lock-holder preemption.
It does not affect real-time tasks.
.P
With
Cheers,
Alex
> ---
> man/man7/sched.7 | 58 ++++++++++++++++++++++++++++++++++--------------
> 1 file changed, 41 insertions(+), 17 deletions(-)
>
> diff --git a/man/man7/sched.7 b/man/man7/sched.7
> index 3299c21dc1ad8..db7753c9e912c 100644
> --- a/man/man7/sched.7
> +++ b/man/man7/sched.7
> @@ -933,16 +933,12 @@ the following to modify the autogroup nice value for
> .EE
> .in
> .SS Real-time features in the mainline Linux kernel
> -.\" FIXME . Probably this text will need some minor tweaking
> -.\" ask Carsten Emde about this.
> +.\" The archaeologist knows about v2.6.9-mm1-V0.1-realtime-preempt
> Since Linux 2.6.18, Linux is gradually
> becoming equipped with real-time capabilities,
> most of which are derived from the former
> .I realtime\-preempt
> patch set.
> -Until the patches have been completely merged into the
> -mainline kernel,
> -they must be installed to achieve the best real-time performance.
> These patches are named:
> .P
> .in +4n
> @@ -953,24 +949,52 @@ they must be installed to achieve the best real-time performance.
> .P
> and can be downloaded from
> .UR http://www.kernel.org\:/pub\:/linux\:/kernel\:/projects\:/rt/
> +.UE
> +or cloned from a git tree
> +.UR https://git.kernel.org\:/pub\:/scm\:/linux\:/kernel\:/git\:/rt\:/linux-stable-rt.git
> .UE .
> +The individual releases are maintained as long as
> +the matching LTS kernel is maintained.
> .P
> -Without the patches and prior to their full inclusion into the mainline
> -kernel, the kernel configuration offers only the three preemption classes
> +Since 6.12 it possible to enable the real-time preemption
> +without the need for any patches.
> +The
> +.I realtime\-patch
> +continues to exist and contains support
> +for not yet integrated architectures,
> +drivers and features that are in development.
> +.P
> +Since 6.13 real-time becomes an option
> +and not a preemption model.
> +With this change,
> +the following preemption models are available:
> .BR CONFIG_PREEMPT_NONE ,
> .BR CONFIG_PREEMPT_VOLUNTARY ,
> +.BR CONFIG_PREEMPT ,
> and
> -.B CONFIG_PREEMPT_DESKTOP
> -which respectively provide no, some, and considerable
> -reduction of the worst-case scheduling latency.
> -.P
> -With the patches applied or after their full inclusion into the mainline
> -kernel, the additional configuration item
> +.BR CONFIG_PREEMPT_LAZY .
> +The real-time capabilities can be enabled with the option
> .B CONFIG_PREEMPT_RT
> -becomes available.
> -If this is selected, Linux is transformed into a regular
> +and the preemption model be set to either
> +.B CONFIG_PREEMPT
> +or
> +.BR CONFIG_PREEMPT_LAZY .
> +The latter model is less eager to preempt
> +.B SCHED_NORMAL
> +tasks in an attempt to reduce lock holder preemption.
> +It does not affect real-time tasks.
> +.P
> +With
> +.B CONFIG_PREEMPT_RT
> +enabled,
> +Linux is transformed into a regular
> real-time operating system.
> -The FIFO and RR scheduling policies are then used to run a thread
> +The
> +.BR SCHED_FIFO ,
> +.BR SCHED_RR ,
> +and
> +.B SCHED_DEADLINE
> +scheduling policies are then used to run a thread
> with true real-time priority and a minimum worst-case scheduling latency.
> .SH NOTES
> The
> @@ -1032,5 +1056,5 @@ and
> .I \%Documentation/\:scheduler/\:sched\-nice\-design\:.txt
> .P
> Worth looking at:
> -.UR http://rt.wiki.kernel.org/\:index.php
> +.UR https://wiki.linuxfoundation.org/\:realtime/\:start
> .UE
> --
> 2.51.0
>
>
--
<https://www.alejandro-colomar.es>
Use port 80 (that is, <...:80/>).
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 3/5] man/man7/sched.7: Update the documentation references
2025-09-15 14:13 [PATCH v2 0/5] sched.7 and small futex.2 updates Sebastian Andrzej Siewior
2025-09-15 14:13 ` [PATCH v2 1/5] man/man2/prctl.2, PR_FUTEX_HASH_SET_SLOTS.2const: Document PR_FUTEX_HASH_SET_SLOTS Sebastian Andrzej Siewior
2025-09-15 14:13 ` [PATCH v2 2/5] man/man7/sched.7: Update the real-time section Sebastian Andrzej Siewior
@ 2025-09-15 14:13 ` Sebastian Andrzej Siewior
2025-10-15 21:43 ` Alejandro Colomar
2025-09-15 14:13 ` [PATCH v2 4/5] man/man2/futex.2: Update the link reference again Sebastian Andrzej Siewior
2025-09-15 14:13 ` [PATCH v2 5/5] man/man3/pthread_cond_init.3: Add a note regarding real-time usage Sebastian Andrzej Siewior
4 siblings, 1 reply; 12+ messages in thread
From: Sebastian Andrzej Siewior @ 2025-09-15 14:13 UTC (permalink / raw)
To: linux-kernel, linux-man
Cc: Alejandro Colomar, André Almeida, Darren Hart,
Davidlohr Bueso, Ingo Molnar, Juri Lelli, Peter Zijlstra,
Thomas Gleixner, Valentin Schneider, Waiman Long,
Sebastian Andrzej Siewior
The section refers to .txt files but they have been moved/ renamed to
.rst some time ago. The mentioned sched-rt-group is inconvenient as
people always complained about CONFIG_RT_GROUP_SCHED.
Everything that describes CFS is not wrong but the kernel the kernel
switched to the Earliest Virtual Deadline First (EEVDF) scheduler.
Instead of updating the file links below (and adding new ones), replace
them with a link to the automatically created scheduler documetation
from that folder. This also has some EEVDF bits :)
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
man/man7/sched.7 | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/man/man7/sched.7 b/man/man7/sched.7
index db7753c9e912c..935ff1fb82db5 100644
--- a/man/man7/sched.7
+++ b/man/man7/sched.7
@@ -1048,12 +1048,9 @@ was not possible up to Linux 2.6.17.
.I Programming for the real world \- POSIX.4
by Bill O.\& Gallmeister, O'Reilly & Associates, Inc., ISBN 1-56592-074-0.
.P
-The Linux kernel source files
-.IR \%Documentation/\:scheduler/\:sched\-deadline\:.txt ,
-.IR \%Documentation/\:scheduler/\:sched\-rt\-group\:.txt ,
-.IR \%Documentation/\:scheduler/\:sched\-design\-CFS\:.txt ,
-and
-.I \%Documentation/\:scheduler/\:sched\-nice\-design\:.txt
+.UR https://docs.kernel.org/\:scheduler
+The Linux kernel documentation for the scheduler
+.UE
.P
Worth looking at:
.UR https://wiki.linuxfoundation.org/\:realtime/\:start
--
2.51.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v2 3/5] man/man7/sched.7: Update the documentation references
2025-09-15 14:13 ` [PATCH v2 3/5] man/man7/sched.7: Update the documentation references Sebastian Andrzej Siewior
@ 2025-10-15 21:43 ` Alejandro Colomar
0 siblings, 0 replies; 12+ messages in thread
From: Alejandro Colomar @ 2025-10-15 21:43 UTC (permalink / raw)
To: Sebastian Andrzej Siewior
Cc: linux-kernel, linux-man, André Almeida, Darren Hart,
Davidlohr Bueso, Ingo Molnar, Juri Lelli, Peter Zijlstra,
Thomas Gleixner, Valentin Schneider, Waiman Long
[-- Attachment #1: Type: text/plain, Size: 2212 bytes --]
Hi Sebastian,
On Mon, Sep 15, 2025 at 04:13:03PM +0200, Sebastian Andrzej Siewior wrote:
> The section refers to .txt files but they have been moved/ renamed to
> .rst some time ago. The mentioned sched-rt-group is inconvenient as
> people always complained about CONFIG_RT_GROUP_SCHED.
> Everything that describes CFS is not wrong but the kernel the kernel
> switched to the Earliest Virtual Deadline First (EEVDF) scheduler.
>
> Instead of updating the file links below (and adding new ones), replace
> them with a link to the automatically created scheduler documetation
> from that folder. This also has some EEVDF bits :)
>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Thanks! I've applied the patch, with the following amendment:
diff --git i/man/man7/sched.7 w/man/man7/sched.7
index 6efdd90c5..8d37db321 100644
--- i/man/man7/sched.7
+++ w/man/man7/sched.7
@@ -1057,7 +1057,7 @@ .SH SEE ALSO
.P
.UR https://docs.kernel.org/\:scheduler
The Linux kernel documentation for the scheduler
-.UE
+.UE .
.P
Worth looking at:
.UR https://wiki.linuxfoundation.org/\:realtime/\:start
Cheers,
Alex
> ---
> man/man7/sched.7 | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/man/man7/sched.7 b/man/man7/sched.7
> index db7753c9e912c..935ff1fb82db5 100644
> --- a/man/man7/sched.7
> +++ b/man/man7/sched.7
> @@ -1048,12 +1048,9 @@ was not possible up to Linux 2.6.17.
> .I Programming for the real world \- POSIX.4
> by Bill O.\& Gallmeister, O'Reilly & Associates, Inc., ISBN 1-56592-074-0.
> .P
> -The Linux kernel source files
> -.IR \%Documentation/\:scheduler/\:sched\-deadline\:.txt ,
> -.IR \%Documentation/\:scheduler/\:sched\-rt\-group\:.txt ,
> -.IR \%Documentation/\:scheduler/\:sched\-design\-CFS\:.txt ,
> -and
> -.I \%Documentation/\:scheduler/\:sched\-nice\-design\:.txt
> +.UR https://docs.kernel.org/\:scheduler
> +The Linux kernel documentation for the scheduler
> +.UE
> .P
> Worth looking at:
> .UR https://wiki.linuxfoundation.org/\:realtime/\:start
> --
> 2.51.0
>
--
<https://www.alejandro-colomar.es>
Use port 80 (that is, <...:80/>).
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 4/5] man/man2/futex.2: Update the link reference again.
2025-09-15 14:13 [PATCH v2 0/5] sched.7 and small futex.2 updates Sebastian Andrzej Siewior
` (2 preceding siblings ...)
2025-09-15 14:13 ` [PATCH v2 3/5] man/man7/sched.7: Update the documentation references Sebastian Andrzej Siewior
@ 2025-09-15 14:13 ` Sebastian Andrzej Siewior
2025-10-15 21:47 ` Alejandro Colomar
2025-09-15 14:13 ` [PATCH v2 5/5] man/man3/pthread_cond_init.3: Add a note regarding real-time usage Sebastian Andrzej Siewior
4 siblings, 1 reply; 12+ messages in thread
From: Sebastian Andrzej Siewior @ 2025-09-15 14:13 UTC (permalink / raw)
To: linux-kernel, linux-man
Cc: Alejandro Colomar, André Almeida, Darren Hart,
Davidlohr Bueso, Ingo Molnar, Juri Lelli, Peter Zijlstra,
Thomas Gleixner, Valentin Schneider, Waiman Long,
Sebastian Andrzej Siewior, Carlos O'Donell
Carlos O'Donell says based on the context, it should be the former link
from that day.
Update the link accordingly.
Cc: Carlos O'Donell <carlos@redhat.com>
Link: https://lore.kernel.org/all/710e8f05-b0b3-489a-9e89-8967cf6a9e70@redhat.com
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
man/man2/futex.2 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man/man2/futex.2 b/man/man2/futex.2
index fe4a239c3812c..1a7cb1b5e08c4 100644
--- a/man/man2/futex.2
+++ b/man/man2/futex.2
@@ -6,7 +6,7 @@
.\"
.\" FIXME Still to integrate are some points from Torvald Riegel's mail of
.\" 2015-01-23:
-.\" https://lore.kernel.org/lkml/1422037788.29655.0.camel@triegel.csb
+.\" https://lore.kernel.org/lkml/1422037145.27573.0.camel@triegel.csb
.\"
.\" FIXME Do we need to add some text regarding Torvald Riegel's 2015-01-24 mail
.\" https://lore.kernel.org/lkml/1422105142.29655.16.camel@triegel.csb
--
2.51.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH v2 4/5] man/man2/futex.2: Update the link reference again.
2025-09-15 14:13 ` [PATCH v2 4/5] man/man2/futex.2: Update the link reference again Sebastian Andrzej Siewior
@ 2025-10-15 21:47 ` Alejandro Colomar
0 siblings, 0 replies; 12+ messages in thread
From: Alejandro Colomar @ 2025-10-15 21:47 UTC (permalink / raw)
To: Sebastian Andrzej Siewior
Cc: linux-kernel, linux-man, André Almeida, Darren Hart,
Davidlohr Bueso, Ingo Molnar, Juri Lelli, Peter Zijlstra,
Thomas Gleixner, Valentin Schneider, Waiman Long,
Carlos O'Donell
[-- Attachment #1: Type: text/plain, Size: 1289 bytes --]
Hi Sebastian,
On Mon, Sep 15, 2025 at 04:13:04PM +0200, Sebastian Andrzej Siewior wrote:
> Carlos O'Donell says based on the context, it should be the former link
> from that day.
>
> Update the link accordingly.
>
> Cc: Carlos O'Donell <carlos@redhat.com>
> Link: https://lore.kernel.org/all/710e8f05-b0b3-489a-9e89-8967cf6a9e70@redhat.com
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Thanks! I've applied the patch.
Have a lovely night!
Alex
> ---
> man/man2/futex.2 | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/man/man2/futex.2 b/man/man2/futex.2
> index fe4a239c3812c..1a7cb1b5e08c4 100644
> --- a/man/man2/futex.2
> +++ b/man/man2/futex.2
> @@ -6,7 +6,7 @@
> .\"
> .\" FIXME Still to integrate are some points from Torvald Riegel's mail of
> .\" 2015-01-23:
> -.\" https://lore.kernel.org/lkml/1422037788.29655.0.camel@triegel.csb
> +.\" https://lore.kernel.org/lkml/1422037145.27573.0.camel@triegel.csb
> .\"
> .\" FIXME Do we need to add some text regarding Torvald Riegel's 2015-01-24 mail
> .\" https://lore.kernel.org/lkml/1422105142.29655.16.camel@triegel.csb
> --
> 2.51.0
>
--
<https://www.alejandro-colomar.es>
Use port 80 (that is, <...:80/>).
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 5/5] man/man3/pthread_cond_init.3: Add a note regarding real-time usage
2025-09-15 14:13 [PATCH v2 0/5] sched.7 and small futex.2 updates Sebastian Andrzej Siewior
` (3 preceding siblings ...)
2025-09-15 14:13 ` [PATCH v2 4/5] man/man2/futex.2: Update the link reference again Sebastian Andrzej Siewior
@ 2025-09-15 14:13 ` Sebastian Andrzej Siewior
2025-10-15 21:53 ` Alejandro Colomar
4 siblings, 1 reply; 12+ messages in thread
From: Sebastian Andrzej Siewior @ 2025-09-15 14:13 UTC (permalink / raw)
To: linux-kernel, linux-man
Cc: Alejandro Colomar, André Almeida, Darren Hart,
Davidlohr Bueso, Ingo Molnar, Juri Lelli, Peter Zijlstra,
Thomas Gleixner, Valentin Schneider, Waiman Long,
Sebastian Andrzej Siewior
The "old" implementation led to priority inversion and was more or less
easy to trigger. It seems that after the rewrite the issue disappeared
especially since the old workaround does not apply anymore.
Add a note mentioning the old problem and why the issue is not gone
since the rewrite in glibc 2.25 but harder to trigger.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
man/man3/pthread_cond_init.3 | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/man/man3/pthread_cond_init.3 b/man/man3/pthread_cond_init.3
index 0045e7ecee075..779f6de6d064b 100644
--- a/man/man3/pthread_cond_init.3
+++ b/man/man3/pthread_cond_init.3
@@ -115,6 +115,7 @@ if all threads always acquire the mutex before signaling the condition,
this guarantees that the condition cannot be signaled (and thus ignored)
between the time a thread locks the mutex
and the time it waits on the condition variable.
+See NOTES below.
.P
.BR pthread_cond_timedwait ()
atomically unlocks
@@ -240,6 +241,26 @@ Some threads are currently waiting on
.BR gettimeofday (2),
.BR nanosleep (2).
.
+.SH NOTES
+The implementation of the provided functions until
+glibc 2.25 used an internal data lock.
+This lock did not support priority-inheritance and
+was subject to unbounded priority inversion,
+visible on a real-time system.
+After the rewrite of the implementation in 2.25
+the usage of internal lock changed.
+The internal lock is always acquired by
+the signaling functions
+.BR pthread_cond_signal ()
+and
+.BR pthread_cond_broadcast ().
+The waiting function acquires the lock
+if the waiting process was interrupted.
+The interruption can be caused for instance by a specified timeout
+and denoted by the error value
+.B ETIMEDOUT
+or a received signal which is denoted by the error value
+.BR EINTR .
.
.SH EXAMPLE
Consider two shared variables
--
2.51.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH v2 5/5] man/man3/pthread_cond_init.3: Add a note regarding real-time usage
2025-09-15 14:13 ` [PATCH v2 5/5] man/man3/pthread_cond_init.3: Add a note regarding real-time usage Sebastian Andrzej Siewior
@ 2025-10-15 21:53 ` Alejandro Colomar
0 siblings, 0 replies; 12+ messages in thread
From: Alejandro Colomar @ 2025-10-15 21:53 UTC (permalink / raw)
To: Sebastian Andrzej Siewior
Cc: linux-kernel, linux-man, André Almeida, Darren Hart,
Davidlohr Bueso, Ingo Molnar, Juri Lelli, Peter Zijlstra,
Thomas Gleixner, Valentin Schneider, Waiman Long
[-- Attachment #1: Type: text/plain, Size: 3908 bytes --]
Hi Sebastian,
On Mon, Sep 15, 2025 at 04:13:05PM +0200, Sebastian Andrzej Siewior wrote:
> The "old" implementation led to priority inversion and was more or less
> easy to trigger. It seems that after the rewrite the issue disappeared
> especially since the old workaround does not apply anymore.
>
> Add a note mentioning the old problem and why the issue is not gone
> since the rewrite in glibc 2.25 but harder to trigger.
>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Thanks! I've applied the patch, with the following amendments:
diff --git i/man/man3/pthread_cond_init.3 w/man/man3/pthread_cond_init.3
index 779f6de6d..9c151dd8c 100644
--- i/man/man3/pthread_cond_init.3
+++ w/man/man3/pthread_cond_init.3
@@ -115,7 +115,7 @@ .SH DESCRIPTION
this guarantees that the condition cannot be signaled (and thus ignored)
between the time a thread locks the mutex
and the time it waits on the condition variable.
-See NOTES below.
+See CAVEATS below.
.P
.BR pthread_cond_timedwait ()
atomically unlocks
@@ -241,13 +241,14 @@ .SH "SEE ALSO"
.BR gettimeofday (2),
.BR nanosleep (2).
.
-.SH NOTES
+.SH CAVEATS
The implementation of the provided functions until
glibc 2.25 used an internal data lock.
This lock did not support priority-inheritance and
was subject to unbounded priority inversion,
visible on a real-time system.
-After the rewrite of the implementation in 2.25
+.P
+After the rewrite of the implementation in glibc 2.25
the usage of internal lock changed.
The internal lock is always acquired by
the signaling functions
@@ -256,10 +257,11 @@ .SH NOTES
.BR pthread_cond_broadcast ().
The waiting function acquires the lock
if the waiting process was interrupted.
-The interruption can be caused for instance by a specified timeout
+The interruption can be caused for instance by a specified timeout,
and denoted by the error value
-.B ETIMEDOUT
-or a received signal which is denoted by the error value
+.BR ETIMEDOUTA ,
+or by a received signal,
+which is denoted by the error value
.BR EINTR .
.
.SH EXAMPLE
Cheers,
Alex
> ---
> man/man3/pthread_cond_init.3 | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> diff --git a/man/man3/pthread_cond_init.3 b/man/man3/pthread_cond_init.3
> index 0045e7ecee075..779f6de6d064b 100644
> --- a/man/man3/pthread_cond_init.3
> +++ b/man/man3/pthread_cond_init.3
> @@ -115,6 +115,7 @@ if all threads always acquire the mutex before signaling the condition,
> this guarantees that the condition cannot be signaled (and thus ignored)
> between the time a thread locks the mutex
> and the time it waits on the condition variable.
> +See NOTES below.
> .P
> .BR pthread_cond_timedwait ()
> atomically unlocks
> @@ -240,6 +241,26 @@ Some threads are currently waiting on
> .BR gettimeofday (2),
> .BR nanosleep (2).
> .
> +.SH NOTES
> +The implementation of the provided functions until
> +glibc 2.25 used an internal data lock.
> +This lock did not support priority-inheritance and
> +was subject to unbounded priority inversion,
> +visible on a real-time system.
> +After the rewrite of the implementation in 2.25
> +the usage of internal lock changed.
> +The internal lock is always acquired by
> +the signaling functions
> +.BR pthread_cond_signal ()
> +and
> +.BR pthread_cond_broadcast ().
> +The waiting function acquires the lock
> +if the waiting process was interrupted.
> +The interruption can be caused for instance by a specified timeout
> +and denoted by the error value
> +.B ETIMEDOUT
> +or a received signal which is denoted by the error value
> +.BR EINTR .
> .
> .SH EXAMPLE
> Consider two shared variables
> --
> 2.51.0
>
--
<https://www.alejandro-colomar.es>
Use port 80 (that is, <...:80/>).
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread