Mon Jan 9 20:08:26 2017 UTC ()
Document kern.sched sysctl variables.


(hubertf)
diff -r1.107 -r1.108 src/share/man/man7/sysctl.7

cvs diff -r1.107 -r1.108 src/share/man/man7/sysctl.7 (expand / switch to unified diff)

--- src/share/man/man7/sysctl.7 2017/01/08 14:28:42 1.107
+++ src/share/man/man7/sysctl.7 2017/01/09 20:08:26 1.108
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: sysctl.7,v 1.107 2017/01/08 14:28:42 wiz Exp $ 1.\" $NetBSD: sysctl.7,v 1.108 2017/01/09 20:08:26 hubertf Exp $
2.\" 2.\"
3.\" Copyright (c) 1993 3.\" Copyright (c) 1993
4.\" The Regents of the University of California. All rights reserved. 4.\" The Regents of the University of California. All rights reserved.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
8.\" are met: 8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright 9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer. 10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the 12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution. 13.\" documentation and/or other materials provided with the distribution.
14.\" 3. Neither the name of the University nor the names of its contributors 14.\" 3. Neither the name of the University nor the names of its contributors
@@ -345,27 +345,27 @@ privilege may change the value. @@ -345,27 +345,27 @@ privilege may change the value.
345.It kern.posix_threads integer no 345.It kern.posix_threads integer no
346.It kern.posix_timers integer no 346.It kern.posix_timers integer no
347.It kern.proc struct kinfo_proc no 347.It kern.proc struct kinfo_proc no
348.It kern.proc2 struct kinfo_proc2 no 348.It kern.proc2 struct kinfo_proc2 no
349.It kern.proc_args string no 349.It kern.proc_args string no
350.It kern.profiling node not applicable 350.It kern.profiling node not applicable
351.\".It kern.pset node not applicable 351.\".It kern.pset node not applicable
352.It kern.rawpartition integer no 352.It kern.rawpartition integer no
353.It kern.root_device string no 353.It kern.root_device string no
354.It kern.root_partition integer no 354.It kern.root_partition integer no
355.It kern.rtc_offset integer yes 355.It kern.rtc_offset integer yes
356.It kern.saved_ids integer no 356.It kern.saved_ids integer no
357.It kern.sbmax integer yes 357.It kern.sbmax integer yes
358.\".It kern.sched node not applicable 358.It kern.sched node not applicable
359.It kern.securelevel integer raise only 359.It kern.securelevel integer raise only
360.It kern.somaxkva integer yes 360.It kern.somaxkva integer yes
361.It kern.synchronized_io integer no 361.It kern.synchronized_io integer no
362.It kern.timecounter node not applicable 362.It kern.timecounter node not applicable
363.It kern.timex struct no 363.It kern.timex struct no
364.It kern.tkstat node not applicable 364.It kern.tkstat node not applicable
365.It kern.tty node not applicable 365.It kern.tty node not applicable
366.It kern.urandom integer no 366.It kern.urandom integer no
367.It kern.usercrypto integer yes 367.It kern.usercrypto integer yes
368.It kern.userasymcrypto integer yes 368.It kern.userasymcrypto integer yes
369.It kern.veriexec node not applicable 369.It kern.veriexec node not applicable
370.It kern.version string no 370.It kern.version string no
371.It kern.vnode struct vnode no 371.It kern.vnode struct vnode no
@@ -1047,28 +1047,124 @@ The name of the root device (e.g., @@ -1047,28 +1047,124 @@ The name of the root device (e.g.,
1047.Dq wd0 ) . 1047.Dq wd0 ) .
1048.It Li kern.root_partition ( Dv KERN_ROOT_PARTITION ) 1048.It Li kern.root_partition ( Dv KERN_ROOT_PARTITION )
1049The root partition on the root device (a == 0). 1049The root partition on the root device (a == 0).
1050.It Li kern.rtc_offset ( Dv KERN_RTC_OFFSET ) 1050.It Li kern.rtc_offset ( Dv KERN_RTC_OFFSET )
1051Return the offset of real time clock from UTC in minutes. 1051Return the offset of real time clock from UTC in minutes.
1052.It Li kern.saved_ids ( Dv KERN_SAVED_IDS ) 1052.It Li kern.saved_ids ( Dv KERN_SAVED_IDS )
1053Returns 1 if saved set-group and saved set-user ID is available. 1053Returns 1 if saved set-group and saved set-user ID is available.
1054.It Li kern.sbmax ( Dv KERN_SBMAX ) 1054.It Li kern.sbmax ( Dv KERN_SBMAX )
1055Maximum socket buffer size. 1055Maximum socket buffer size.
1056.\" XXX units? 1056.\" XXX units?
1057.It Li kern.securelevel ( Dv KERN_SECURELVL ) 1057.It Li kern.securelevel ( Dv KERN_SECURELVL )
1058See 1058See
1059.Xr secmodel_securelevel 9 . 1059.Xr secmodel_securelevel 9 .
1060.\" .It Li kern.sched 1060.It Li kern.sched ( dynamic )
1061.\" XXX: Undocumented. 1061Influence the scheduling of LWPs, their priorisation and how they are
 1062distributed on and moved between CPUs.
 1063.Bl -column "kern.sched.balance_period" "integer" "Changeable" -offset indent
 1064.It Sy Third level name Sy Type Sy Changeable
 1065.It kern.sched.cacheht_time integer yes
 1066.It kern.sched.balance_period integer yes
 1067.It kern.sched.average_weight integer yes
 1068.It kern.sched.min_catch integer yes
 1069.It kern.sched.timesoftints integer yes
 1070.It kern.sched.kpreempt_pri integer yes
 1071.It kern.sched.upreempt_pri integer yes
 1072.It kern.sched.maxts integer yes
 1073.It kern.sched.mints integer yes
 1074.It kern.sched.name string no
 1075.It kern.sched.rtts integer no
 1076.It kern.sched.pri_min integer no
 1077.It kern.sched.pri_max integer no
 1078.El
 1079.Pp
 1080The variables are as follows:
 1081.Bl -tag -width "123456"
 1082.It Li kern.sched.cacheht_time ( dynamic )
 1083Cache hotness time in which a LWP is kept on one particular CPU
 1084and not moved to another CPU. This reduces the overhead of flushing
 1085and reloading caches.
 1086Defaults to 3ms.
 1087Needs to be given in
 1088.Dq hz
 1089units, see
 1090.Xr mstohz 9 .
 1091.It Li kern.sched.balance_period ( dynamic )
 1092Interval at which the CPU queues are checked for re-balancing.
 1093Defaults to 300ms.
 1094Needs to be given in
 1095.Dq hz
 1096units, see
 1097.Xr mstohz 9 .
 1098.It Li kern.sched.average_weight ( dynamic )
 1099Can be used to influence how likely LWPs are to be migrated from
 1100one CPU's queue of LWPs that are ready to run to a different, idle CPU.
 1101The value gives the percentage for weighting the average count of
 1102migratable threads from the past against the current number of
 1103migratable threads.
 1104A small value gives more weight to the past, a larger values more weight
 1105on the current situation.
 1106Defaults to 50 and must be between 0 and 100.
 1107.It Li kern.sched.min_catch ( dynamic )
 1108Minimum count of migratable (runable) threads for catching (stealing)
 1109from another CPU.
 1110Defaults to 1 but can be increased to decrease chance of thread
 1111migration between CPUs.
 1112.It Li kern.sched.timesoftints ( dynamic )
 1113Enable tracking of CPU time for soft interrupts
 1114as part of a LWP's real execution time.
 1115Set to a non-zero value to enable,
 1116and see
 1117.Xr ps 1
 1118for printing CPU times.
 1119.It Li kern.sched.kpreempt_pri ( dynamic )
 1120Minimum priority to trigger kernel preemption.
 1121.It Li kern.sched.upreempt_pri ( dynamic )
 1122Minimum priority to trigger user preemption.
 1123.It Li kern.sched.maxts ( dynamic )
 1124Scheduler specific maximal time quantum (in milliseconds).
 1125Must be set to a value larger than
 1126.Dq mints
 1127and between 10 and
 1128.Dq hz
 1129as given by the
 1130.Dv kern.clockrate
 1131sysctl.
 1132Provided by the M2 scheduler.
 1133.It Li kern.sched.mints ( dynamic )
 1134Scheduler specific minimal time quantum (in milliseconds).
 1135Must be set to a value smaller than
 1136.Dq maxts
 1137and between 1 and
 1138.Dq hz
 1139as given by the
 1140.Dq kern.clockrate
 1141sysctl.
 1142Provided by the M2 scheduler.
 1143.It Li kern.sched.name ( dynamic )
 1144Scheduler name.
 1145Provided both by the M2 and the 4BSD scheduler.
 1146.It Li kern.sched.rtts ( dynamic )
 1147Fixed scheduler specific round-robin time quantum in milliseconds.
 1148Provided both by the M2 and the 4BSD scheduler.
 1149.It Li kern.sched.pri_min ( dynamic )
 1150Minimal POSIX real-time priority.
 1151See
 1152.Xr sched 3 .
 1153.It Li kern.sched.pri_max ( dynamic )
 1154Maximal POSIX real-time priority.
 1155See
 1156.Xr sched 3 .
 1157.El
1062.It Li kern.somaxkva ( Dv KERN_SOMAXKVA ) 1158.It Li kern.somaxkva ( Dv KERN_SOMAXKVA )
1063Maximum amount of kernel memory to be used for socket buffers. 1159Maximum amount of kernel memory to be used for socket buffers.
1064.\" XXX units? 1160.\" XXX units?
1065.It Li kern.synchronized_io ( Dv KERN_SYNCHRONIZED_IO ) 1161.It Li kern.synchronized_io ( Dv KERN_SYNCHRONIZED_IO )
1066Returns 1 if the 1162Returns 1 if the
1067.St -p1003.1b-93 1163.St -p1003.1b-93
1068Synchronized I/O Option is available on this system, 1164Synchronized I/O Option is available on this system,
1069otherwise\ 0. 1165otherwise\ 0.
1070.It Li kern.timecounter ( dynamic ) 1166.It Li kern.timecounter ( dynamic )
1071Display and control the timecounter source of the system. 1167Display and control the timecounter source of the system.
1072.Bl -column "kern.timecounter.timestepwarnings" "integer" "Changeable" -offset indent 1168.Bl -column "kern.timecounter.timestepwarnings" "integer" "Changeable" -offset indent
1073.It Sy Third level name Ta Sy Type Ta Sy Changeable 1169.It Sy Third level name Ta Sy Type Ta Sy Changeable
1074.It kern.timecounter.choice string no 1170.It kern.timecounter.choice string no