diff options
author | jeff <jeff@FreeBSD.org> | 2002-10-12 05:32:24 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2002-10-12 05:32:24 +0000 |
commit | ef4d4e378e012b3efd909e2abc5c1ddcf38faee7 (patch) | |
tree | 69991942d3c51153d9210031e7380779edf05aaf /sys/kern/kern_exit.c | |
parent | cf318b70e5aa88b25cdf3d47eacce75c5aa889db (diff) | |
download | FreeBSD-src-ef4d4e378e012b3efd909e2abc5c1ddcf38faee7.zip FreeBSD-src-ef4d4e378e012b3efd909e2abc5c1ddcf38faee7.tar.gz |
- Create a new scheduler api that is defined in sys/sched.h
- Begin moving scheduler specific functionality into sched_4bsd.c
- Replace direct manipulation of scheduler data with hooks provided by the
new api.
- Remove KSE specific state modifications and single runq assumptions from
kern_switch.c
Reviewed by: -arch
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r-- | sys/kern/kern_exit.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index a586bef..6c83432 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -57,6 +57,7 @@ #include <sys/vnode.h> #include <sys/resourcevar.h> #include <sys/signalvar.h> +#include <sys/sched.h> #include <sys/sx.h> #include <sys/ptrace.h> #include <sys/acct.h> /* for acct_process() function prototype */ @@ -605,21 +606,13 @@ loop: nfound++; if (p->p_state == PRS_ZOMBIE) { /* - * charge childs scheduling cpu usage to parent - * XXXKSE assume only one thread & kse & ksegrp - * keep estcpu in each ksegrp - * so charge it to the ksegrp that did the wait - * since process estcpu is sum of all ksegrps, - * this is strictly as expected. - * Assume that the child process aggregated all - * tke estcpu into the 'build-in' ksegrp. - * XXXKSE + * Allow the scheduler to adjust the priority of the + * parent when a kseg is exiting. */ if (curthread->td_proc->p_pid != 1) { mtx_lock_spin(&sched_lock); - curthread->td_ksegrp->kg_estcpu = - ESTCPULIM(curthread->td_ksegrp->kg_estcpu + - FIRST_KSEGRP_IN_PROC(p)->kg_estcpu); + sched_exit(curthread->td_ksegrp, + FIRST_KSEGRP_IN_PROC(p)); mtx_unlock_spin(&sched_lock); } |