Sun Mar 15 14:05:18 2009 UTC ()
Consistently provide -width for tag lists.


(joerg)
diff -r1.4 -r1.5 src/share/man/man9/csf.9

cvs diff -r1.4 -r1.5 src/share/man/man9/csf.9 (expand / switch to unified diff)

--- src/share/man/man9/csf.9 2008/04/30 13:10:58 1.4
+++ src/share/man/man9/csf.9 2009/03/15 14:05:18 1.5
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: csf.9,v 1.4 2008/04/30 13:10:58 martin Exp $ 1.\" $NetBSD: csf.9,v 1.5 2009/03/15 14:05:18 joerg Exp $
2.\" 2.\"
3.\" Copyright (c) 2002 The NetBSD Foundation, Inc. 3.\" Copyright (c) 2002 The NetBSD Foundation, Inc.
4.\" All rights reserved. 4.\" All rights reserved.
5.\" 5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation 6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Daniel Sieger. 7.\" by Daniel Sieger.
8.\" 8.\"
9.\" Redistribution and use in source and binary forms, with or without 9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions 10.\" modification, are permitted provided that the following conditions
11.\" are met: 11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright 12.\" 1. Redistributions of source code must retain the above copyright
13.\" notice, this list of conditions and the following disclaimer. 13.\" notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" 2. Redistributions in binary form must reproduce the above copyright
@@ -89,88 +89,88 @@ provides a modular and self-contained in @@ -89,88 +89,88 @@ provides a modular and self-contained in
89implementing different thread scheduling algorithms. 89implementing different thread scheduling algorithms.
90The different schedulers can be selected at compile-time. 90The different schedulers can be selected at compile-time.
91Currently, the only scheduler available is 91Currently, the only scheduler available is
92.Xr sched_4bsd 9 , 92.Xr sched_4bsd 9 ,
93the traditional 4.4BSD thread scheduler. 93the traditional 4.4BSD thread scheduler.
94.Pp 94.Pp
95The interface is divided into two parts: A set of functions each 95The interface is divided into two parts: A set of functions each
96scheduler needs to implement and common functions used by all 96scheduler needs to implement and common functions used by all
97schedulers. 97schedulers.
98.Sh Scheduler-specific functions 98.Sh Scheduler-specific functions
99The following functions have to be implemented by the individual 99The following functions have to be implemented by the individual
100scheduler. 100scheduler.
101.Ss Scheduler initialization 101.Ss Scheduler initialization
102.Bl -tag 102.Bl -tag -width compact
103.It Ft void Fn sched_cpuattach "struct cpu_info *" 103.It Ft void Fn sched_cpuattach "struct cpu_info *"
104Per-CPU scheduler initialization routine. 104Per-CPU scheduler initialization routine.
105.It Ft void Fn sched_rqinit "void" 105.It Ft void Fn sched_rqinit "void"
106Initialize the scheduler's runqueue data structures. 106Initialize the scheduler's runqueue data structures.
107.It Ft void Fn sched_setup "void" 107.It Ft void Fn sched_setup "void"
108Setup initial scheduling parameters and kick off timeout driven 108Setup initial scheduling parameters and kick off timeout driven
109events. 109events.
110.El 110.El
111.Ss Runqueue handling 111.Ss Runqueue handling
112Runqueue handling is completely internal to the scheduler. 112Runqueue handling is completely internal to the scheduler.
113Other parts of the kernel should access runqueues only through the 113Other parts of the kernel should access runqueues only through the
114following functions: 114following functions:
115.Bl -tag 115.Bl -tag -width compact
116.It Ft void Fn sched_enqueue "lwp_t *" "bool" 116.It Ft void Fn sched_enqueue "lwp_t *" "bool"
117Place an LWP within the scheduler's runqueue structures. 117Place an LWP within the scheduler's runqueue structures.
118.It Ft void Fn sched_dequeue "lwp_t *" 118.It Ft void Fn sched_dequeue "lwp_t *"
119Remove an LWP from the scheduler's runqueue structures. 119Remove an LWP from the scheduler's runqueue structures.
120.It Ft lwp_t * Fn sched_nextlwp "void" 120.It Ft lwp_t * Fn sched_nextlwp "void"
121Return the LWP that should run the CPU next. 121Return the LWP that should run the CPU next.
122.It Ft bool Fn sched_curcpu_runnable_p "void" 122.It Ft bool Fn sched_curcpu_runnable_p "void"
123Indicate if there is a runnable LWP for the current CPU. 123Indicate if there is a runnable LWP for the current CPU.
124.It Ft void Fn sched_print_runqueue "void (*pr)(const char *, ...)" 124.It Ft void Fn sched_print_runqueue "void (*pr)(const char *, ...)"
125Print runqueues in DDB. 125Print runqueues in DDB.
126.El 126.El
127.Ss Core scheduler functions 127.Ss Core scheduler functions
128.Bl -tag 128.Bl -tag -width compact
129.It Ft void Fn sched_tick "struct cpu_info *" 129.It Ft void Fn sched_tick "struct cpu_info *"
130Periodically called from 130Periodically called from
131.Xr hardclock 9 . 131.Xr hardclock 9 .
132Determines if a reschedule is necessary, if the running LWP has 132Determines if a reschedule is necessary, if the running LWP has
133used up its quantum. 133used up its quantum.
134.It Ft void Fn sched_schedclock "lwp_t *" 134.It Ft void Fn sched_schedclock "lwp_t *"
135Periodically called from 135Periodically called from
136.Fn schedclock 136.Fn schedclock
137in order to handle priority adjustment. 137in order to handle priority adjustment.
138.El 138.El
139.Ss Priority adjustment 139.Ss Priority adjustment
140.Bl -tag 140.Bl -tag -width compact
141.It Ft void Fn sched_nice "struct proc *, int" 141.It Ft void Fn sched_nice "struct proc *, int"
142Recalculate the process priority according to its nice value. 142Recalculate the process priority according to its nice value.
143.El 143.El
144.Ss General helper functions 144.Ss General helper functions
145.Bl -tag 145.Bl -tag -width compact
146.It Ft void Fn sched_proc_fork "struct proc *" "struct proc *" 146.It Ft void Fn sched_proc_fork "struct proc *" "struct proc *"
147Inherit the scheduling history of the parent process after 147Inherit the scheduling history of the parent process after
148.Fn fork . 148.Fn fork .
149.It Ft void Fn sched_proc_exit "struct proc *" "struct proc *" 149.It Ft void Fn sched_proc_exit "struct proc *" "struct proc *"
150Charge back a processes parent for its resource usage. 150Charge back a processes parent for its resource usage.
151.It Ft void Fn sched_lwp_fork "lwp_t *" 151.It Ft void Fn sched_lwp_fork "lwp_t *"
152LWP-specific version of the above 152LWP-specific version of the above
153.It Ft void Fn sched_lwp_exit "lwp_t *" 153.It Ft void Fn sched_lwp_exit "lwp_t *"
154LWP-specific version of the above 154LWP-specific version of the above
155.It Ft void Fn sched_setrunnable "lwp_t *" 155.It Ft void Fn sched_setrunnable "lwp_t *"
156Scheduler-specific actions for 156Scheduler-specific actions for
157.Fn setrunnable . 157.Fn setrunnable .
158.It Ft void Fn sched_pstats_hook "struct proc *" "int" 158.It Ft void Fn sched_pstats_hook "struct proc *" "int"
159Scheduler-specific actions for 159Scheduler-specific actions for
160.Fn sched_pstats . 160.Fn sched_pstats .
161.El 161.El
162.Sh Common scheduler functions 162.Sh Common scheduler functions
163.Bl -tag 163.Bl -tag -width compact
164.It Ft pri_t Fn sched_kpri "lwp_t *" 164.It Ft pri_t Fn sched_kpri "lwp_t *"
165Scale a priority level to a kernel priority level, usually for an LWP 165Scale a priority level to a kernel priority level, usually for an LWP
166that is about to sleep. 166that is about to sleep.
167.It Ft void Fn sched_pstats "void *" 167.It Ft void Fn sched_pstats "void *"
168Update process statistics and check CPU resource allocation. 168Update process statistics and check CPU resource allocation.
169.It Ft inline void Fn resched_cpu "lwp_t *" 169.It Ft inline void Fn resched_cpu "lwp_t *"
170Arrange for a reschedule. 170Arrange for a reschedule.
171.It Ft void Fn setrunnable "lwp_t *" 171.It Ft void Fn setrunnable "lwp_t *"
172Change process state to be runnable, placing it on a runqueue if it 172Change process state to be runnable, placing it on a runqueue if it
173is in memory, awakening the swapper otherwise. 173is in memory, awakening the swapper otherwise.
174.It Ft void Fn schedclock "lwp_t *" 174.It Ft void Fn schedclock "lwp_t *"
175Scheduler clock. 175Scheduler clock.
176Periodically called from 176Periodically called from