Skip to contentSkip to conversation

sched_rr_get_interval.2: update Linux notes

PATCH In review Clemens Ladisch 2 participants 4 messages Oct 11, 2011 – Oct 16, 2011 2 messages not in the archive Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched_rr_get_interval.2: update Linux notes

man2/sched_rr_get_interval.2 +9 -3
@@ -98,18 +98,24 @@
 .\" for SCHED_RR processes.  For RR processes the timeslice is always
 .\" DEF_TIMESLICE, or 0.1 secs.
 .\" Was the following really true for older kernels?
-.\" Must build a 2.6.8 kernel and retest, and rewrite the following text
-.\" appropriately.
+.\" It is again true for at least Linux 2.6.12, but stopped in 2.6.24.
 POSIX does not specify any mechanism for controlling the size of the
 round-robin time quantum.
 However, Linux provides a (nonportable) method of doing this.
-The quantum can be controlled by adjusting the process's nice value (see
+The quantum of both
+.B SCHED_RR
+and
+.B SCHED_OTHER
+processes can be controlled by adjusting the process's nice value (see
 .BR setpriority (2)).
 Assigning a negative (i.e., high) nice value results in a longer quantum;
 assigning a positive (i.e., low) nice value results in a shorter quantum.
 The default quantum is 0.1 seconds;
 the degree to which changing the nice value affects the
 quantum has varied somewhat across kernel versions.
+Since Linux 2.6.24, the
+.B SCHED_RR
+quantum cannot be modified.
 .\" .SH BUGS
 .\" As of Linux 1.3.81
 .\" .BR sched_rr_get_interval ()

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
In reply to a message not in the archive

Hello Clemens,

Quoted 1 line · Clemens Ladisch

Thanks for this. Do you have a pointer to the relevant kernel commit?

Cheers,

Michael

Quoted 31 lines
man2/sched_rr_get_interval.2 +0 -0
@@ -98,18 +98,24 @@

 .\" for SCHED_RR processes.  For RR processes the timeslice is always .\" DEF_TIMESLICE, or 0.1 secs.
 .\" Was the following really true for older kernels?
-.\" Must build a 2.6.8 kernel and retest, and rewrite the following text -.\" appropriately.
+.\" It is again true for at least Linux 2.6.12, but stopped in 2.6.24. POSIX does not specify any mechanism for controlling the size of the round-robin time quantum.
 However, Linux provides a (nonportable) method of doing this.

man2/sched_rr_get_interval.2 +5 -1
-The quantum can be controlled by adjusting the process's nice value (see
+The quantum of both
+.B SCHED_RR
+and
+.B SCHED_OTHER
+processes can be controlled by adjusting the process's nice value (see

 .BR setpriority (2)).
 Assigning a negative (i.e., high) nice value results in a longer quantum; assigning a positive (i.e., low) nice value results in a shorter quantum. The default quantum is 0.1 seconds;
 the degree to which changing the nice value affects the quantum has varied somewhat across kernel versions.

man2/sched_rr_get_interval.2 +3 -0
+Since Linux 2.6.24, the
+.B SCHED_RR
+quantum cannot be modified.

 .\" .SH BUGS
 .\" As of Linux 1.3.81
 .\" .BR sched_rr_get_interval ()

Signature · 7 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface"; http://man7.org/tlpi/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#4 lore raw
In reply to a message not in the archive
Quoted 4 lines · Michael Kerrisk
Quoted 1 line · Clemens Ladisch

Thanks for this. Do you have a pointer to the relevant kernel commit?

http://git.kernel.org/linus/a4ec24b48dde

Regards,
Clemens
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#5 lore raw
In reply to a message not in the archive

Hello Clemens,

Thanks once again for this patch. See my notes below.

Quoted 11 lines · Clemens Ladisch
man2/sched_rr_get_interval.2 +0 -0
@@ -98,18 +98,24 @@

 .\" for SCHED_RR processes.  For RR processes the timeslice is always .\" DEF_TIMESLICE, or 0.1 secs.
 .\" Was the following really true for older kernels?
-.\" Must build a 2.6.8 kernel and retest, and rewrite the following text -.\" appropriately.
+.\" It is again true for at least Linux 2.6.12, but stopped in 2.6.24.

(At this point, I think we can simply drop these source code comments altogether. Your patch supplied the needed details.)

man2/sched_rr_get_interval.2

Quoted 9 lines

 POSIX does not specify any mechanism for controlling the size of the round-robin time quantum.
 However, Linux provides a (nonportable) method of doing this.

man2/sched_rr_get_interval.2 +5 -1
-The quantum can be controlled by adjusting the process's nice value (see
+The quantum of both
+.B SCHED_RR
+and
+.B SCHED_OTHER
+processes can be controlled by adjusting the process's nice value (see

I don't really want to document the SCHED_OTHER detail here. This page is about SCHED_RR processes. The point about SCHED_OTHER is an implementation detail that isn't relevant to SCHED_RR.

man2/sched_rr_get_interval.2

Quoted 9 lines

 .BR setpriority (2)).
 Assigning a negative (i.e., high) nice value results in a longer quantum; assigning a positive (i.e., low) nice value results in a shorter quantum. The default quantum is 0.1 seconds;
 the degree to which changing the nice value affects the quantum has varied somewhat across kernel versions.

man2/sched_rr_get_interval.2 +3 -0
+Since Linux 2.6.24, the
+.B SCHED_RR
+quantum cannot be modified.

Here's the goodies!

Quoted 3 lines

 .\" .SH BUGS
 .\" As of Linux 1.3.81
 .\" .BR sched_rr_get_interval ()

So, I tweaked your patch somewhat, and applied the patch below for man-pages-3.36.

Cheers,

Michael

man2/sched_rr_get_interval.2 +1 -8
@@ -102,16 +102,9 @@ is available define
 in
 .IR <unistd.h> .
 .SS Linux Notes
-.\" FIXME
-.\" From at least Linux 2.6.9, the following is no longer true
-.\" for SCHED_RR processes.  For RR processes the timeslice is always
-.\" DEF_TIMESLICE, or 0.1 secs.
-.\" Was the following really true for older kernels?
-.\" Must build a 2.6.8 kernel and retest, and rewrite the following text
-.\" appropriately.
 POSIX does not specify any mechanism for controlling the size of the
 round-robin time quantum.
-However, Linux provides a (nonportable) method of doing this.
+Older Linux kernels provide a (nonportable) method of doing this.
 The quantum can be controlled by adjusting the process's nice value (see
 .BR setpriority (2)).
 Assigning a negative (i.e., high) nice value results in a longer quantum;
@@ -119,6 +112,11 @@ assigning a positive (i.e., low) nice value

results in a shorter quantum.
The default quantum is 0.1 seconds;
the degree to which changing the nice value affects the quantum has varied somewhat across kernel versions.
+Since Linux 2.6.24,
+.\" commit a4ec24b48ddef1e93f7578be53270f0b95ad666c +the
+.BR SCHED_RR
+quantum cannot be modified.
.\" .SH BUGS
.\" As of Linux 1.3.81
.\" .BR sched_rr_get_interval ()

Signature · 7 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface"; http://man7.org/tlpi/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html