diff options
author | davidxu <davidxu@FreeBSD.org> | 2006-03-14 04:00:21 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2006-03-14 04:00:21 +0000 |
commit | baf4d3f4f12d3b17c7d2e9d7223d00263845e846 (patch) | |
tree | b40300bb8bf302bb48a41fcda0c8519614ec3bb8 /sys/kern/kern_exit.c | |
parent | 69c2af7e71505cfc7b3460ba03cf8a9191b00141 (diff) | |
download | FreeBSD-src-baf4d3f4f12d3b17c7d2e9d7223d00263845e846.zip FreeBSD-src-baf4d3f4f12d3b17c7d2e9d7223d00263845e846.tar.gz |
1. Count last time slice, this intends to fix
"calcru: runtime went backwards" bug for threaded process.
2. Add comment about possible logical problem with scheduler.
MFC after: 3 days
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r-- | sys/kern/kern_exit.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 0738e69..9c469f7 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -110,7 +110,6 @@ sys_exit(struct thread *td, struct sys_exit_args *uap) void exit1(struct thread *td, int rv) { - uint64_t new_switchtime; struct proc *p, *nq, *q; struct tty *tp; struct vnode *ttyvp; @@ -557,19 +556,6 @@ retry: p->p_state = PRS_ZOMBIE; PROC_UNLOCK(p->p_pptr); - /* Do the same timestamp bookkeeping that mi_switch() would do. */ - new_switchtime = cpu_ticks(); - p->p_rux.rux_runtime += (new_switchtime - PCPU_GET(switchtime)); - p->p_rux.rux_uticks += td->td_uticks; - p->p_rux.rux_sticks += td->td_sticks; - p->p_rux.rux_iticks += td->td_iticks; - PCPU_SET(switchtime, new_switchtime); - PCPU_SET(switchticks, ticks); - cnt.v_swtch++; - - /* Add our usage into the usage of all our children. */ - ruadd(p->p_ru, &p->p_rux, &p->p_stats->p_cru, &p->p_crux); - sched_exit(p->p_pptr, td); /* |