From 70f08890fc1cf735f25aaa4982c4789edc7337f2 Mon Sep 17 00:00:00 2001 From: kib Date: Mon, 24 May 2010 10:23:49 +0000 Subject: Fix the double counting of the last process thread td_incruntime on exit, that is done once in thread_exit() and the second time in proc_reap(), by clearing td_incruntime. Use the opportunity to revert to the pre-RUSAGE_THREAD exporting of ruxagg() instead of ruxagg_locked() and use it from thread_exit(). Diagnosed and tested by: neel MFC after: 3 days --- sys/kern/kern_thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/kern/kern_thread.c') diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index d7a9199..5d80016 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -430,8 +430,8 @@ thread_exit(void) PMC_SWITCH_CONTEXT(td, PMC_FN_CSW_OUT); #endif PROC_UNLOCK(p); + ruxagg(p, td); thread_lock(td); - ruxagg_locked(&p->p_rux, td); PROC_SUNLOCK(p); td->td_state = TDS_INACTIVE; #ifdef WITNESS -- cgit v1.1