FreeBSD kernel kern code
|
#include <sys/cdefs.h>
#include "opt_hwpmc_hooks.h"
#include "opt_sched.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/cpuset.h>
#include <sys/kernel.h>
#include <sys/ktr.h>
#include <sys/lock.h>
#include <sys/kthread.h>
#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/resourcevar.h>
#include <sys/sched.h>
#include <sys/sdt.h>
#include <sys/smp.h>
#include <sys/sysctl.h>
#include <sys/sx.h>
#include <sys/turnstile.h>
#include <sys/umtxvar.h>
#include <machine/pcb.h>
#include <machine/smp.h>
Go to the source code of this file.
Data Structures | |
struct | td_sched |
struct | pcpuidlestat |
Macros | |
#define | ESTCPULIM(e) |
#define | INVERSE_ESTCPU_WEIGHT 8 /* 1 / (priorities per estcpu level). */ |
#define | NICE_WEIGHT 1 /* Priorities per nice level. */ |
#define | TS_NAME_LEN (MAXCOMLEN + sizeof(" td ") + sizeof(__XSTRING(UINT_MAX))) |
#define | TDF_DIDRUN TDF_SCHED0 /* thread actually ran. */ |
#define | TDF_BOUND TDF_SCHED1 /* Bound to one CPU. */ |
#define | TDF_SLICEEND TDF_SCHED2 /* Thread time slice is over. */ |
#define | TSF_AFFINITY 0x0001 /* Has a non-"full" CPU set. */ |
#define | SKE_RUNQ_PCPU(ts) ((ts)->ts_runq != 0 && (ts)->ts_runq != &runq) |
#define | THREAD_CAN_SCHED(td, cpu) CPU_ISSET((cpu), &(td)->td_cpuset->cs_mask) |
#define | loadfactor(loadav) (2 * (loadav)) |
#define | decay_cpu(loadfac, cpu) (((loadfac) * (cpu)) / ((loadfac) + FSCALE)) |
#define | CCPU_SHIFT 11 |
Functions | |
__FBSDID ("$FreeBSD$") | |
_Static_assert (sizeof(struct thread)+sizeof(struct td_sched)<=sizeof(struct thread0_storage), "increase struct thread0_storage.t0st_sched size") | |
static void | setup_runqs (void) |
static void | schedcpu (void) |
static void | schedcpu_thread (void) |
static void | sched_priority (struct thread *td, u_char prio) |
static void | sched_setup (void *dummy) |
static void | maybe_resched (struct thread *td) |
static void | updatepri (struct thread *td) |
static void | resetpriority (struct thread *td) |
static void | resetpriority_thread (struct thread *td) |
SYSINIT (schedcpu, SI_SUB_LAST, SI_ORDER_FIRST, kproc_start, &sched_kp) | |
SYSINIT (sched_setup, SI_SUB_RUN_QUEUE, SI_ORDER_FIRST, sched_setup, NULL) | |
static void | sched_initticks (void *dummy) |
SYSINIT (sched_initticks, SI_SUB_CLOCKS, SI_ORDER_THIRD, sched_initticks, NULL) | |
DPCPU_DEFINE_STATIC (struct pcpuidlestat, idlestat) | |
static int | sysctl_kern_quantum (SYSCTL_HANDLER_ARGS) |
SYSCTL_NODE (_kern, OID_AUTO, sched, CTLFLAG_RD|CTLFLAG_MPSAFE, 0, "Scheduler") | |
SYSCTL_STRING (_kern_sched, OID_AUTO, name, CTLFLAG_RD, "4BSD", 0, "Scheduler name") | |
SYSCTL_PROC (_kern_sched, OID_AUTO, quantum, CTLTYPE_INT|CTLFLAG_RW|CTLFLAG_MPSAFE, NULL, 0, sysctl_kern_quantum, "I", "Quantum for timeshare threads in microseconds") | |
SYSCTL_INT (_kern_sched, OID_AUTO, slice, CTLFLAG_RW, &sched_slice, 0, "Quantum for timeshare threads in stathz ticks") | |
SDT_PROVIDER_DEFINE (sched) | |
SDT_PROBE_DEFINE3 (sched,,, change__pri, "struct thread *", "struct proc *", "uint8_t") | |
SDT_PROBE_DEFINE3 (sched,,, dequeue, "struct thread *", "struct proc *", "void *") | |
SDT_PROBE_DEFINE4 (sched,,, enqueue, "struct thread *", "struct proc *", "void *", "int") | |
SDT_PROBE_DEFINE4 (sched,,, lend__pri, "struct thread *", "struct proc *", "uint8_t", "struct thread *") | |
SDT_PROBE_DEFINE2 (sched,,, load__change, "int", "int") | |
SDT_PROBE_DEFINE2 (sched,,, off__cpu, "struct thread *", "struct proc *") | |
SDT_PROBE_DEFINE (sched,,, on__cpu) | |
SDT_PROBE_DEFINE (sched,,, remain__cpu) | |
SDT_PROBE_DEFINE2 (sched,,, surrender, "struct thread *", "struct proc *") | |
static __inline void | sched_load_add (void) |
static __inline void | sched_load_rem (void) |
int | maybe_preempt (struct thread *td) |
SYSCTL_UINT (_kern, OID_AUTO, ccpu, CTLFLAG_RD, &ccpu, 0, "Decay factor used for updating %CPU") | |
void | schedinit (void) |
void | schedinit_ap (void) |
int | sched_runnable (void) |
int | sched_rr_interval (void) |
static void | sched_clock_tick (struct thread *td) |
void | sched_clock (struct thread *td, int cnt) |
void | sched_exit (struct proc *p, struct thread *td) |
void | sched_exit_thread (struct thread *td, struct thread *child) |
void | sched_fork (struct thread *td, struct thread *childtd) |
void | sched_fork_thread (struct thread *td, struct thread *childtd) |
void | sched_nice (struct proc *p, int nice) |
void | sched_class (struct thread *td, int class) |
void | sched_lend_prio (struct thread *td, u_char prio) |
void | sched_unlend_prio (struct thread *td, u_char prio) |
void | sched_prio (struct thread *td, u_char prio) |
void | sched_user_prio (struct thread *td, u_char prio) |
void | sched_lend_user_prio (struct thread *td, u_char prio) |
void | sched_lend_user_prio_cond (struct thread *td, u_char prio) |
void | sched_sleep (struct thread *td, int pri) |
void | sched_switch (struct thread *td, int flags) |
void | sched_wakeup (struct thread *td, int srqflags) |
void | sched_add (struct thread *td, int flags) |
void | sched_rem (struct thread *td) |
struct thread * | sched_choose (void) |
void | sched_preempt (struct thread *td) |
void | sched_userret_slowpath (struct thread *td) |
void | sched_bind (struct thread *td, int cpu) |
void | sched_unbind (struct thread *td) |
int | sched_is_bound (struct thread *td) |
void | sched_relinquish (struct thread *td) |
int | sched_load (void) |
int | sched_sizeof_proc (void) |
int | sched_sizeof_thread (void) |
fixpt_t | sched_pctcpu (struct thread *td) |
u_int | sched_estcpu (struct thread *td) |
void | sched_idletd (void *dummy) |
static void | sched_throw_tail (struct thread *td) |
void | sched_ap_entry (void) |
void | sched_throw (struct thread *td) |
void | sched_fork_exit (struct thread *td) |
char * | sched_tdname (struct thread *td) |
void | sched_affinity (struct thread *td) |
Variables | |
static struct mtx | sched_lock |
static int | realstathz = 127 |
static int | sched_tdcnt |
static int | sched_slice = 12 |
static struct kproc_desc | sched_kp |
static struct runq | runq |
static fixpt_t | ccpu = 0.95122942450071400909 * FSCALE |
#define CCPU_SHIFT 11 |
Definition at line 455 of file sched_4bsd.c.
#define decay_cpu | ( | loadfac, | |
cpu | |||
) | (((loadfac) * (cpu)) / ((loadfac) + FSCALE)) |
Definition at line 436 of file sched_4bsd.c.
#define ESTCPULIM | ( | e | ) |
Definition at line 77 of file sched_4bsd.c.
#define INVERSE_ESTCPU_WEIGHT 8 /* 1 / (priorities per estcpu level). */ |
Definition at line 83 of file sched_4bsd.c.
Definition at line 435 of file sched_4bsd.c.
#define NICE_WEIGHT 1 /* Priorities per nice level. */ |
Definition at line 85 of file sched_4bsd.c.
Definition at line 116 of file sched_4bsd.c.
#define TDF_BOUND TDF_SCHED1 /* Bound to one CPU. */ |
Definition at line 110 of file sched_4bsd.c.
#define TDF_DIDRUN TDF_SCHED0 /* thread actually ran. */ |
Definition at line 109 of file sched_4bsd.c.
#define TDF_SLICEEND TDF_SCHED2 /* Thread time slice is over. */ |
Definition at line 111 of file sched_4bsd.c.
#define THREAD_CAN_SCHED | ( | td, | |
cpu | |||
) | CPU_ISSET((cpu), &(td)->td_cpuset->cs_mask) |
Definition at line 119 of file sched_4bsd.c.
#define TS_NAME_LEN (MAXCOMLEN + sizeof(" td ") + sizeof(__XSTRING(UINT_MAX))) |
Definition at line 87 of file sched_4bsd.c.
#define TSF_AFFINITY 0x0001 /* Has a non-"full" CPU set. */ |
Definition at line 114 of file sched_4bsd.c.
__FBSDID | ( | "$FreeBSD$" | ) |
_Static_assert | ( | sizeof(struct thread)+sizeof(struct td_sched)<=sizeof(struct thread0_storage) | , |
"increase struct thread0_storage.t0st_sched size" | |||
) |
DPCPU_DEFINE_STATIC | ( | struct pcpuidlestat | , |
idlestat | |||
) |
int maybe_preempt | ( | struct thread * | td | ) |
Definition at line 320 of file sched_4bsd.c.
Referenced by sched_add().
|
static |
Definition at line 305 of file sched_4bsd.c.
Referenced by resetpriority_thread(), and sched_add().
|
static |
Definition at line 604 of file sched_4bsd.c.
References INVERSE_ESTCPU_WEIGHT, NICE_WEIGHT, and sched_user_prio().
Referenced by sched_clock_tick(), sched_nice(), sched_wakeup(), and schedcpu().
|
static |
Definition at line 623 of file sched_4bsd.c.
References maybe_resched(), and sched_prio().
Referenced by sched_clock_tick(), sched_nice(), and schedcpu().
void sched_add | ( | struct thread * | td, |
int | flags | ||
) |
Definition at line 1285 of file sched_4bsd.c.
References flags, maybe_preempt(), maybe_resched(), runq, runq_add(), sched_load_add(), sched_lock, sched_tdname(), SKE_RUNQ_PCPU, smp_started, TDF_BOUND, thread_lock_set(), ts, and TSF_AFFINITY.
Referenced by _gtaskqueue_start_threads(), _taskqueue_start_threads(), callout_process(), do_fork(), intr_event_schedule_thread(), ithread_destroy(), kick_init(), kproc_create(), kthread_add(), sched_affinity(), sched_priority(), sched_switch(), sched_wakeup(), thread_create(), and turnstile_unpend().
void sched_affinity | ( | struct thread * | td | ) |
Definition at line 1762 of file sched_4bsd.c.
References runq, sched_add(), sched_rem(), TDF_BOUND, THREAD_CAN_SCHED, ts, and TSF_AFFINITY.
Referenced by cpuset_update_thread().
void sched_ap_entry | ( | void | ) |
Definition at line 1678 of file sched_4bsd.c.
References cpu_ticks, sched_lock, sched_throw_tail(), and ticks.
void sched_bind | ( | struct thread * | td, |
int | cpu | ||
) |
Definition at line 1531 of file sched_4bsd.c.
References mi_switch(), TDF_BOUND, and ts.
Referenced by cf_set_method(), epoch_block_handler_preempt(), epoch_drain_callbacks(), epoch_wait_preempt(), kern_reboot(), quiesce_cpus(), and taskqgroup_binder().
struct thread * sched_choose | ( | void | ) |
Definition at line 1463 of file sched_4bsd.c.
References runq, runq_choose(), runq_choose_fuzz(), runq_remove(), sched_lock, and TDF_DIDRUN.
Referenced by choosethread(), and choosethread_panic().
void sched_class | ( | struct thread * | td, |
int | class | ||
) |
Definition at line 829 of file sched_4bsd.c.
Referenced by idle_setup(), ithread_create(), rtp_to_pri(), and start_softclock().
void sched_clock | ( | struct thread * | td, |
int | cnt | ||
) |
Definition at line 751 of file sched_4bsd.c.
References sched_clock_tick().
Referenced by statclock().
|
static |
Definition at line 721 of file sched_4bsd.c.
References ESTCPULIM, pcpuidlestat::idlecalls, INVERSE_ESTCPU_WEIGHT, pcpuidlestat::oldidlecalls, resetpriority(), resetpriority_thread(), sched_slice, TDF_SLICEEND, and ts.
Referenced by sched_clock().
u_int sched_estcpu | ( | struct thread * | td | ) |
Definition at line 1636 of file sched_4bsd.c.
References td_sched::ts_estcpu.
Referenced by fill_kinfo_aggregate(), and fill_kinfo_thread().
void sched_exit | ( | struct proc * | p, |
struct thread * | td | ||
) |
Definition at line 762 of file sched_4bsd.c.
References sched_exit_thread(), and sched_tdname().
Referenced by exit1().
void sched_exit_thread | ( | struct thread * | td, |
struct thread * | child | ||
) |
Definition at line 773 of file sched_4bsd.c.
References child, ESTCPULIM, sched_load_rem(), sched_tdname(), and td_sched::ts_estcpu.
Referenced by sched_exit(), and thread_exit().
void sched_fork | ( | struct thread * | td, |
struct thread * | childtd | ||
) |
Definition at line 789 of file sched_4bsd.c.
References sched_fork_thread().
Referenced by do_fork().
void sched_fork_exit | ( | struct thread * | td | ) |
Definition at line 1716 of file sched_4bsd.c.
References sched_lock, and sched_tdname().
Referenced by fork_exit().
void sched_fork_thread | ( | struct thread * | td, |
struct thread * | childtd | ||
) |
Definition at line 795 of file sched_4bsd.c.
References cpuset_ref(), sched_lock, ts, td_sched::ts_estcpu, td_sched::ts_flags, and TSF_AFFINITY.
Referenced by kthread_add(), sched_fork(), and thread_create().
void sched_idletd | ( | void * | dummy | ) |
Definition at line 1646 of file sched_4bsd.c.
References Giant, pcpuidlestat::idlecalls, mi_switch(), pcpuidlestat::oldidlecalls, sched_lock, and sched_runnable().
Referenced by idle_setup().
|
static |
Definition at line 652 of file sched_4bsd.c.
References hogticks, hz, realstathz, sched_slice, and stathz.
int sched_is_bound | ( | struct thread * | td | ) |
Definition at line 1560 of file sched_4bsd.c.
References TDF_BOUND.
Referenced by epoch_drain_callbacks(), and epoch_wait_preempt().
void sched_lend_prio | ( | struct thread * | td, |
u_char | prio | ||
) |
Definition at line 868 of file sched_4bsd.c.
References sched_priority().
Referenced by propagate_priority(), sched_unlend_prio(), and turnstile_claim().
void sched_lend_user_prio | ( | struct thread * | td, |
u_char | prio | ||
) |
Definition at line 939 of file sched_4bsd.c.
References sched_prio().
Referenced by do_lock_pp(), do_unlock_pp(), sched_lend_user_prio_cond(), umtx_pi_claim(), umtx_pi_drop(), umtx_propagate_priority(), and umtx_repropagate_priority().
void sched_lend_user_prio_cond | ( | struct thread * | td, |
u_char | prio | ||
) |
Definition at line 955 of file sched_4bsd.c.
References sched_lend_user_prio().
Referenced by umtx_thread_cleanup().
int sched_load | ( | void | ) |
Definition at line 1574 of file sched_4bsd.c.
References sched_tdcnt.
Referenced by loadav().
|
static |
Definition at line 284 of file sched_4bsd.c.
References sched_tdcnt.
Referenced by sched_add(), and sched_setup().
|
static |
Definition at line 293 of file sched_4bsd.c.
References sched_tdcnt.
Referenced by sched_exit_thread(), sched_rem(), and sched_switch().
void sched_nice | ( | struct proc * | p, |
int | nice | ||
) |
Definition at line 814 of file sched_4bsd.c.
References resetpriority(), and resetpriority_thread().
Referenced by donice().
fixpt_t sched_pctcpu | ( | struct thread * | td | ) |
Definition at line 1592 of file sched_4bsd.c.
References ts.
Referenced by fill_kinfo_aggregate(), fill_kinfo_thread(), proc_sum(), thread_compare(), and tty_info().
void sched_preempt | ( | struct thread * | td | ) |
Definition at line 1508 of file sched_4bsd.c.
References mi_switch().
void sched_prio | ( | struct thread * | td, |
u_char | prio | ||
) |
Definition at line 901 of file sched_4bsd.c.
References sched_priority(), and turnstile_adjust().
Referenced by _gtaskqueue_start_threads(), _taskqueue_start_threads(), acct_thread(), ast(), cf_set_method(), epoch_adjust_prio(), epoch_block_handler_preempt(), epoch_wait_preempt(), idle_setup(), ithread_update(), kern_yield(), kproc_create(), resetpriority_thread(), rtp_to_pri(), sched_lend_user_prio(), sched_sleep(), sched_sync(), sched_unlend_prio(), sleepq_resume_thread(), start_softclock(), sys_yield(), and tdsigwakeup().
|
static |
Definition at line 839 of file sched_4bsd.c.
References sched_add(), sched_rem(), and sched_tdname().
Referenced by sched_lend_prio(), and sched_prio().
void sched_relinquish | ( | struct thread * | td | ) |
Definition at line 1567 of file sched_4bsd.c.
References mi_switch().
Referenced by ksched_yield(), and thread_single().
void sched_rem | ( | struct thread * | td | ) |
Definition at line 1433 of file sched_4bsd.c.
References runq, runq_remove(), sched_load_rem(), sched_lock, sched_tdname(), and ts.
Referenced by sched_affinity(), and sched_priority().
int sched_rr_interval | ( | void | ) |
Definition at line 699 of file sched_4bsd.c.
References hz, realstathz, and sched_slice.
Referenced by ksched_attach().
int sched_runnable | ( | void | ) |
Definition at line 689 of file sched_4bsd.c.
References runq, and runq_check().
Referenced by sched_idletd().
|
static |
Definition at line 639 of file sched_4bsd.c.
References sched_load_add(), and setup_runqs().
int sched_sizeof_proc | ( | void | ) |
Definition at line 1580 of file sched_4bsd.c.
Referenced by procinit().
int sched_sizeof_thread | ( | void | ) |
Definition at line 1586 of file sched_4bsd.c.
Referenced by threadinit().
void sched_sleep | ( | struct thread * | td, |
int | pri | ||
) |
Definition at line 973 of file sched_4bsd.c.
References sched_prio(), and ticks.
Referenced by sleepq_switch(), thread_suspend_one(), and thread_suspend_switch().
void sched_switch | ( | struct thread * | td, |
int | flags | ||
) |
Definition at line 986 of file sched_4bsd.c.
References choosethread(), flags, mtx, sched_add(), sched_load_rem(), sched_lock, sched_tdname(), TDF_SLICEEND, thread_lock_block(), and ts.
Referenced by mi_switch().
char * sched_tdname | ( | struct thread * | td | ) |
Definition at line 1735 of file sched_4bsd.c.
References snprintf(), and ts.
Referenced by __mtx_lock_sleep(), __rw_rlock_hard(), __rw_wlock_hard(), _sx_slock_hard(), _sx_xlock_hard(), sched_add(), sched_exit(), sched_exit_thread(), sched_fork_exit(), sched_priority(), sched_rem(), sched_switch(), and statclock().
void sched_throw | ( | struct thread * | td | ) |
Definition at line 1702 of file sched_4bsd.c.
References sched_lock, and sched_throw_tail().
Referenced by thread_exit().
|
static |
Definition at line 1666 of file sched_4bsd.c.
References choosethread(), and sched_lock.
Referenced by sched_ap_entry(), and sched_throw().
void sched_unbind | ( | struct thread * | td | ) |
Definition at line 1552 of file sched_4bsd.c.
Referenced by cf_set_method(), epoch_drain_callbacks(), epoch_wait_preempt(), and quiesce_cpus().
void sched_unlend_prio | ( | struct thread * | td, |
u_char | prio | ||
) |
Definition at line 884 of file sched_4bsd.c.
References sched_lend_prio(), and sched_prio().
Referenced by turnstile_disown(), and turnstile_unpend().
void sched_user_prio | ( | struct thread * | td, |
u_char | prio | ||
) |
Definition at line 928 of file sched_4bsd.c.
Referenced by kproc_create(), resetpriority(), and rtp_to_pri().
void sched_userret_slowpath | ( | struct thread * | td | ) |
Definition at line 1521 of file sched_4bsd.c.
void sched_wakeup | ( | struct thread * | td, |
int | srqflags | ||
) |
Definition at line 1118 of file sched_4bsd.c.
References resetpriority(), sched_add(), sched_slice, ts, and updatepri().
Referenced by setrunnable().
|
static |
Definition at line 463 of file sched_4bsd.c.
References allproc_lock, averunnable, ccpu, CCPU_SHIFT, decay_cpu, loadfactor, realstathz, resetpriority(), resetpriority_thread(), TDF_DIDRUN, ts, and updatepri().
Referenced by schedcpu_thread().
|
static |
Definition at line 564 of file sched_4bsd.c.
References hz, and schedcpu().
void schedinit | ( | void | ) |
Definition at line 670 of file sched_4bsd.c.
References sched_lock, and sched_slice.
Referenced by proc0_init().
void schedinit_ap | ( | void | ) |
Definition at line 682 of file sched_4bsd.c.
SDT_PROBE_DEFINE | ( | sched | , |
on__cpu | |||
) |
SDT_PROBE_DEFINE | ( | sched | , |
remain__cpu | |||
) |
SDT_PROBE_DEFINE2 | ( | sched | , |
load__change | , | ||
"int" | , | ||
"int" | |||
) |
SDT_PROBE_DEFINE2 | ( | sched | , |
off__cpu | , | ||
"struct thread *" | , | ||
"struct proc *" | |||
) |
SDT_PROBE_DEFINE2 | ( | sched | , |
surrender | , | ||
"struct thread *" | , | ||
"struct proc *" | |||
) |
SDT_PROBE_DEFINE3 | ( | sched | , |
change__pri | , | ||
"struct thread *" | , | ||
"struct proc *" | , | ||
"uint8_t" | |||
) |
SDT_PROBE_DEFINE3 | ( | sched | , |
dequeue | , | ||
"struct thread *" | , | ||
"struct proc *" | , | ||
"void *" | |||
) |
SDT_PROBE_DEFINE4 | ( | sched | , |
enqueue | , | ||
"struct thread *" | , | ||
"struct proc *" | , | ||
"void *" | , | ||
"int" | |||
) |
SDT_PROBE_DEFINE4 | ( | sched | , |
lend__pri | , | ||
"struct thread *" | , | ||
"struct proc *" | , | ||
"uint8_t" | , | ||
"struct thread *" | |||
) |
SDT_PROVIDER_DEFINE | ( | sched | ) |
|
static |
Definition at line 182 of file sched_4bsd.c.
References runq, and runq_init().
Referenced by sched_setup().
SYSCTL_INT | ( | _kern_sched | , |
OID_AUTO | , | ||
slice | , | ||
CTLFLAG_RW | , | ||
& | sched_slice, | ||
0 | , | ||
"Quantum for timeshare threads in stathz ticks" | |||
) |
|
static |
Definition at line 195 of file sched_4bsd.c.
References hogticks, hz, realstathz, sched_slice, and sysctl_handle_int().
SYSCTL_NODE | ( | _kern | , |
OID_AUTO | , | ||
sched | , | ||
CTLFLAG_RD| | CTLFLAG_MPSAFE, | ||
0 | , | ||
"Scheduler" | |||
) |
SYSCTL_PROC | ( | _kern_sched | , |
OID_AUTO | , | ||
quantum | , | ||
CTLTYPE_INT|CTLFLAG_RW| | CTLFLAG_MPSAFE, | ||
NULL | , | ||
0 | , | ||
sysctl_kern_quantum | , | ||
"I" | , | ||
"Quantum for timeshare threads in microseconds" | |||
) |
SYSCTL_UINT | ( | _kern | , |
OID_AUTO | , | ||
ccpu | , | ||
CTLFLAG_RD | , | ||
& | ccpu, | ||
0 | , | ||
"Decay factor used for updating %CPU" | |||
) |
SYSINIT | ( | sched_initticks | , |
SI_SUB_CLOCKS | , | ||
SI_ORDER_THIRD | , | ||
sched_initticks | , | ||
NULL | |||
) |
SYSINIT | ( | sched_setup | , |
SI_SUB_RUN_QUEUE | , | ||
SI_ORDER_FIRST | , | ||
sched_setup | , | ||
NULL | |||
) |
SYSINIT | ( | schedcpu | , |
SI_SUB_LAST | , | ||
SI_ORDER_FIRST | , | ||
kproc_start | , | ||
& | sched_kp | ||
) |
|
static |
Definition at line 579 of file sched_4bsd.c.
References averunnable, decay_cpu, loadfactor, and ts.
Referenced by sched_wakeup(), and schedcpu().
|
static |
Definition at line 439 of file sched_4bsd.c.
Referenced by schedcpu().
|
static |
Definition at line 128 of file sched_4bsd.c.
Referenced by sched_initticks(), sched_rr_interval(), schedcpu(), and sysctl_kern_quantum().
|
static |
Definition at line 163 of file sched_4bsd.c.
Referenced by sched_add(), sched_affinity(), sched_choose(), sched_rem(), sched_runnable(), and setup_runqs().
|
static |
Definition at line 147 of file sched_4bsd.c.
|
static |
Definition at line 126 of file sched_4bsd.c.
Referenced by sched_add(), sched_ap_entry(), sched_choose(), sched_fork_exit(), sched_fork_thread(), sched_idletd(), sched_rem(), sched_switch(), sched_throw(), sched_throw_tail(), and schedinit().
|
static |
Definition at line 130 of file sched_4bsd.c.
Referenced by sched_clock_tick(), sched_initticks(), sched_rr_interval(), sched_wakeup(), schedinit(), and sysctl_kern_quantum().
|
static |
Definition at line 129 of file sched_4bsd.c.
Referenced by sched_load(), sched_load_add(), and sched_load_rem().