Date: Wed, 28 Jun 2006 23:15:14 GMT From: Chris Jones <cdjones@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 100241 for review Message-ID: <200606282315.k5SNFEdj072260@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=100241 Change 100241 by cdjones@cdjones-impulse on 2006/06/28 23:15:02 Add some notes about who calls what. Affected files ... .. //depot/projects/soc2006/cdjones_jail/src/sys/kern/sched_hier.c#3 edit Differences ... ==== //depot/projects/soc2006/cdjones_jail/src/sys/kern/sched_hier.c#3 (text+ko) ==== @@ -24,6 +24,7 @@ */ #include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); #include "opt_hwpmc_hooks.h" @@ -79,14 +80,24 @@ /* TODO */ } +/* Internal machinations for hierarchical scheduler go here. + * + * We need an interface for the sub-schedulers to implement. + * + */ + + + /* Common external interface stuff goes here. - (from sys/sched.h) -*/ + * (from sys/sched.h) + */ +/* Initialize the scheduler, called from init_main.c. + * Code taken blindly from sched_4bsd.c. + */ void schedinit(void) { - proc0.p_sched = NULL; ksegrp0.kg_sched = &kg_sched0; thread0.td_sched = &kse0; @@ -96,65 +107,91 @@ kg_sched0.skg_avail_openings = 0; /* we are already running */ } +/* Calculate the load average. + * Called from kern_synch:loadav. + */ int sched_load(void) { } +/* Do we have a runnable process? + * Called from kern_idle:idle_proc. + */ int -sched_rr_internal(void) -{ - -} - -int sched_runnable(void) { } +/* Remove a thread from the scheduler. + * Called from kern_exit:exit1. + */ void sched_exit(struct proc *p, struct thread *childtd) { } - +/* Adjust thread priorities on fork. + * Called from kern_fork:fork1. + */ void sched_fork(struct thread *td, struct thread *childtd) { } +/* Adjust a thread's class. + * Called from kern_idle:idle_setup and kern_resource:rtp_to_pri. + */ void sched_class(struct ksegrp *kg, int class) { } +/* + * Called from kern_thread:thread_exit. + */ void sched_exit_ksegrp(struct ksegrp *kg, struct thread *childtd) { } +/* + * Called from kern_kse:kse_create and kern_thr:create_thread. + */ void sched_fork_ksegrp(struct ksegrp *kg, struct thread *childtd) { } +/* + * Called from kern_resource:donice and kern_sig:tdsigwakeup. + */ void sched_nice(struct proc *p, int nice) { } +/* + * Called from kern_thread:thread_exit. + */ void sched_exit_thread(struct thread *td, struct thread *child) { } +/* + * + */ void sched_fork_thread(struct thread *td, struct thread *child) { } +/* + * Called from kern_proc:fill_kinfo_thread. + */ fixpt_t sched_pctcpu(struct thread *td) { @@ -247,3 +284,6 @@ { return (sizeof(struct thread) + sizeof(struct td_sched)); } + +#define KERN_SWITCH_INCLUDE 1 +#include "kern/kern_switch.c"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606282315.k5SNFEdj072260>