git: fb797f841dab - main - scheduler.4: document common scheduler sysctls

From: Minsoo Choo <mchoo_at_FreeBSD.org>
Date: Tue, 10 Nov 2026 22:20:38 UTC
The branch main has been updated by mchoo:

URL: https://cgit.FreeBSD.org/src/commit/?id=fb797f841dab55bcac9c81aada1d211aa2026a37

commit fb797f841dab55bcac9c81aada1d211aa2026a37
Author:     Minsoo Choo <mchoo@FreeBSD.org>
AuthorDate: 2026-09-25 15:43:30 +0000
Commit:     Minsoo Choo <mchoo@FreeBSD.org>
CommitDate: 2026-11-10 22:17:43 +0000

    scheduler.4: document common scheduler sysctls
    
    Reviewed by:    bcr, jhb, olce
    Approved by:    jhb, olce (mentor)
    MFC after:      2 weeks
    Sponsored by:   FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D60002
---
 share/man/man4/Makefile       |  1 +
 share/man/man4/dtrace_sched.4 |  3 ++-
 share/man/man4/sched_4bsd.4   |  7 +++--
 share/man/man4/sched_ule.4    |  7 +++--
 share/man/man4/scheduler.4    | 61 +++++++++++++++++++++++++++++++++++++++++++
 share/man/man4/smp.4          |  3 ++-
 6 files changed, 76 insertions(+), 6 deletions(-)

diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile
index 6495d8890e2f..4a39645fcba3 100644
--- a/share/man/man4/Makefile
+++ b/share/man/man4/Makefile
@@ -543,6 +543,7 @@ MAN=	aac.4 \
 	scc.4 \
 	sched_4bsd.4 \
 	sched_ule.4 \
+	scheduler.4 \
 	screen.4 \
 	scsi.4 \
 	sctp.4 \
diff --git a/share/man/man4/dtrace_sched.4 b/share/man/man4/dtrace_sched.4
index b085ffe43e3c..b0141f35717a 100644
--- a/share/man/man4/dtrace_sched.4
+++ b/share/man/man4/dtrace_sched.4
@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd April 18, 2015
+.Dd September 25, 2026
 .Dt DTRACE_SCHED 4
 .Os
 .Sh NAME
@@ -210,6 +210,7 @@ probes are specific to
 .Fx .
 .Sh SEE ALSO
 .Xr dtrace 1 ,
+.Xr scheduler 4 ,
 .Xr sched_4bsd 4 ,
 .Xr sched_ule 4 ,
 .Xr SDT 9 ,
diff --git a/share/man/man4/sched_4bsd.4 b/share/man/man4/sched_4bsd.4
index c8b3938fcbde..1f0a637fdb83 100644
--- a/share/man/man4/sched_4bsd.4
+++ b/share/man/man4/sched_4bsd.4
@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd January 21, 2008
+.Dd September 25, 2026
 .Dt SCHED_4BSD 4
 .Os
 .Sh NAME
@@ -37,6 +37,9 @@ scheduler
 is the traditional system scheduler, providing both high throughput and solid
 interactive response in the presence of load.
 .Pp
+Common scheduler sysctls are documented in
+.Xr scheduler 4 .
+.Pp
 The following sysctls are relevant to the operation of
 .Nm :
 .Bl -tag -width indent
@@ -58,7 +61,7 @@ on wakeup.
 .Pp
 Some sysctls will be available only on systems supporting SMP.
 .Sh SEE ALSO
-.Xr sched_ule 4 ,
+.Xr scheduler 4 ,
 .Xr sysctl 8
 .Sh HISTORY
 The
diff --git a/share/man/man4/sched_ule.4 b/share/man/man4/sched_ule.4
index 764ff394c9f6..2e713d91cca3 100644
--- a/share/man/man4/sched_ule.4
+++ b/share/man/man4/sched_ule.4
@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd August 10, 2012
+.Dd September 25, 2026
 .Dt SCHED_ULE 4
 .Os
 .Sh NAME
@@ -52,6 +52,9 @@ Interactivity heuristics that detect interactive applications and schedules
 them preferentially under high load.
 .El
 .Pp
+Common scheduler sysctls are documented in
+.Xr scheduler 4 .
+.Pp
 The following sysctls are relevant to the operation of
 .Nm :
 .Bl -tag -width indent
@@ -62,7 +65,7 @@ This read-write sysctl reports or sets the length of the quantum (in
 micro-seconds) granted to a thread.
 .El
 .Sh SEE ALSO
-.Xr sched_4bsd 4 ,
+.Xr scheduler 4 ,
 .Xr sysctl 8
 .Sh HISTORY
 The
diff --git a/share/man/man4/scheduler.4 b/share/man/man4/scheduler.4
new file mode 100644
index 000000000000..50b24d6466b1
--- /dev/null
+++ b/share/man/man4/scheduler.4
@@ -0,0 +1,61 @@
+.\"
+.\" Copyright (c) 2026 FreeBSD Foundation
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
+.\" Author: Minsoo Choo <mchoo@FreeBSD.org>
+.\"
+.Dd September 25, 2026
+.Dt SCHEDULER 4
+.Os
+.Sh NAME
+.Nm scheduler
+.Nd common scheduler controls and statistics
+.Sh DESCRIPTION
+The
+.Nm
+interface provides sysctls shared by the system schedulers.
+Scheduler-specific controls are described in
+.Xr sched_4bsd 4
+and
+.Xr sched_ule 4 .
+.Pp
+The following sysctls are available:
+.Bl -tag -width indent
+.It Va kern.sched.name
+The name of the active scheduler.
+This is read-only at run time, but can be set as a boot-time tunable to select
+a scheduler compiled into the kernel.
+.It Va kern.sched.available
+A comma-separated list of schedulers compiled into the kernel.
+.It Va kern.sched.preemption
+Whether kernel preemption support was compiled in.
+This value is read-only and cannot be changed at run time.
+.It Va kern.sched.cpusetsize
+The size, in bytes, of the kernel's
+.Vt cpuset_t .
+.It Va kern.sched.cpusetsizemin
+The minimum supported size, in bytes, of a CPU set passed to the kernel.
+.It Va kern.sched.topology_spec
+An XML description of the detected CPU topology.
+See
+.Xr smp 4
+for the format.
+.El
+.Pp
+When the kernel is built with
+.Cd "options SCHED_STATS" ,
+the following sysctls are also available:
+.Bl -tag -width indent
+.It Va kern.sched.stats
+A node containing read-only counters for scheduling events.
+These include context-switch reasons and interrupt-thread events;
+additional counters depend on the scheduler.
+.It Va kern.sched.stats.reset
+Writing a nonzero value resets the scheduler statistics to zero.
+.El
+.Sh SEE ALSO
+.Xr sched_4bsd 4 ,
+.Xr sched_ule 4 ,
+.Xr smp 4 ,
+.Xr sysctl 8
diff --git a/share/man/man4/smp.4 b/share/man/man4/smp.4
index a02d69b0dc4f..6940ca0f0cab 100644
--- a/share/man/man4/smp.4
+++ b/share/man/man4/smp.4
@@ -21,7 +21,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd January 4, 2019
+.Dd September 25, 2026
 .Dt SMP 4
 .Os
 .Sh NAME
@@ -135,6 +135,7 @@ command may be used to view the status of multi-processor support.
 .Sh SEE ALSO
 .Xr cpuset 1 ,
 .Xr mptable 1 ,
+.Xr scheduler 4 ,
 .Xr sched_4bsd 4 ,
 .Xr sched_ule 4 ,
 .Xr loader 8 ,