Module Name:    src
Committed By:   hubertf
Date:           Mon Jan  9 20:08:26 UTC 2017

Modified Files:
        src/share/man/man7: sysctl.7

Log Message:
Document kern.sched sysctl variables.


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/share/man/man7/sysctl.7

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man7/sysctl.7
diff -u src/share/man/man7/sysctl.7:1.107 src/share/man/man7/sysctl.7:1.108
--- src/share/man/man7/sysctl.7:1.107	Sun Jan  8 14:28:42 2017
+++ src/share/man/man7/sysctl.7	Mon Jan  9 20:08:26 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sysctl.7,v 1.107 2017/01/08 14:28:42 wiz Exp $
+.\"	$NetBSD: sysctl.7,v 1.108 2017/01/09 20:08:26 hubertf Exp $
 .\"
 .\" Copyright (c) 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -355,7 +355,7 @@ privilege may change the value.
 .It kern.rtc_offset	integer	yes
 .It kern.saved_ids	integer	no
 .It kern.sbmax	integer	yes
-.\".It kern.sched	node	not applicable
+.It kern.sched	node	not applicable
 .It kern.securelevel	integer	raise only
 .It kern.somaxkva	integer	yes
 .It kern.synchronized_io	integer	no
@@ -1057,8 +1057,104 @@ Maximum socket buffer size.
 .It Li kern.securelevel ( Dv KERN_SECURELVL )
 See
 .Xr secmodel_securelevel 9 .
-.\" .It Li kern.sched
-.\" XXX: Undocumented.
+.It Li kern.sched ( dynamic )
+Influence the scheduling of LWPs, their priorisation and how they are
+distributed on and moved between CPUs.
+.Bl -column "kern.sched.balance_period" "integer" "Changeable" -offset indent
+.It Sy Third level name	   Sy Type	 Sy Changeable
+.It kern.sched.cacheht_time	   integer	 yes
+.It kern.sched.balance_period	   integer	 yes
+.It kern.sched.average_weight	   integer	 yes
+.It kern.sched.min_catch	   integer	 yes
+.It kern.sched.timesoftints	   integer	 yes
+.It kern.sched.kpreempt_pri	   integer	 yes
+.It kern.sched.upreempt_pri	   integer	 yes
+.It kern.sched.maxts	   integer	 yes
+.It kern.sched.mints	   integer	 yes 
+.It kern.sched.name	   string	 no 
+.It kern.sched.rtts	   integer	 no
+.It kern.sched.pri_min	   integer	 no
+.It kern.sched.pri_max	   integer	 no
+.El
+.Pp
+The variables are as follows:
+.Bl -tag -width "123456"
+.It Li kern.sched.cacheht_time ( dynamic )
+Cache hotness time in which a LWP is kept on one particular CPU
+and not moved to another CPU. This reduces the overhead of flushing
+and reloading caches.  
+Defaults to 3ms.
+Needs to be given in 
+.Dq hz
+units, see
+.Xr mstohz 9 .
+.It Li kern.sched.balance_period ( dynamic )
+Interval at which the CPU queues are checked for re-balancing.
+Defaults to 300ms.
+Needs to be given in 
+.Dq hz
+units, see
+.Xr mstohz 9 .
+.It Li kern.sched.average_weight ( dynamic )
+Can be used to influence how likely LWPs are to be migrated from
+one CPU's queue of LWPs that are ready to run to a different, idle CPU. 
+The value gives the percentage for weighting the average count of
+migratable threads from the past against the current number of
+migratable threads. 
+A small value gives more weight to the past, a larger values more weight 
+on the current situation.
+Defaults to 50 and must be between 0 and 100. 
+.It Li kern.sched.min_catch ( dynamic )
+Minimum count of migratable (runable) threads for catching (stealing)
+from another CPU.
+Defaults to 1 but can be increased to decrease chance of thread
+migration between CPUs. 
+.It Li kern.sched.timesoftints ( dynamic )
+Enable tracking of CPU time for soft interrupts
+as part of a LWP's real execution time.
+Set to a non-zero value to enable,
+and see
+.Xr ps 1
+for printing CPU times.
+.It Li kern.sched.kpreempt_pri ( dynamic )
+Minimum priority to trigger kernel preemption.
+.It Li kern.sched.upreempt_pri ( dynamic )
+Minimum priority to trigger user preemption.
+.It Li kern.sched.maxts ( dynamic )
+Scheduler specific maximal time quantum (in milliseconds).
+Must be set to a value larger than
+.Dq mints
+and between 10 and
+.Dq hz 
+as given by the
+.Dv kern.clockrate
+sysctl.
+Provided by the M2 scheduler.
+.It Li kern.sched.mints ( dynamic )
+Scheduler specific minimal time quantum (in milliseconds).
+Must be set to a value smaller than
+.Dq maxts
+and between 1 and
+.Dq hz 
+as given by the
+.Dq kern.clockrate
+sysctl.
+Provided by the M2 scheduler.
+.It Li kern.sched.name ( dynamic )
+Scheduler name. 
+Provided both by the M2 and the 4BSD scheduler.
+.It Li kern.sched.rtts ( dynamic )
+Fixed scheduler specific round-robin time quantum in milliseconds.
+Provided both by the M2 and the 4BSD scheduler.
+.It Li kern.sched.pri_min ( dynamic )
+Minimal POSIX real-time priority.
+See
+.Xr sched 3 .
+.It Li kern.sched.pri_max ( dynamic )
+Maximal POSIX real-time priority.
+See
+.Xr sched 3 .
+.El
 .It Li kern.somaxkva ( Dv KERN_SOMAXKVA )
 Maximum amount of kernel memory to be used for socket buffers.
 .\" XXX units?

Reply via email to