From bc0eadb21d99ae42fb629bab36adfe6ac36c8ec2 Mon Sep 17 00:00:00 2001 From: jeff Date: Fri, 21 Sep 2007 04:10:23 +0000 Subject: - Redefine p_swtime and td_slptime as p_swtick and td_slptick. This changes the units from seconds to the value of 'ticks' when swapped in/out. ULE does not have a periodic timer that scans all threads in the system and as such maintaining a per-second counter is difficult. - Change computations requiring the unit in seconds to subtract ticks and divide by hz. This does make the wraparound condition hz times more frequent but this is still in the range of several months to years and the adverse effects are minimal. Approved by: re --- sys/kern/kern_fork.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/kern/kern_fork.c') diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index f8fc9de..e6f4d15 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -500,6 +500,7 @@ again: * Increase reference counts on shared objects. */ p2->p_flag = P_INMEM; + p2->p_swtick = ticks; if (p1->p_flag & P_PROFIL) startprofclock(p2); td2->td_ucred = crhold(p2->p_ucred); -- cgit v1.1