From owner-svn-src-all@FreeBSD.ORG Wed May 26 19:26:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA98B1065675; Wed, 26 May 2010 19:26:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 80CB68FC12; Wed, 26 May 2010 19:26:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4QJQSBC037274; Wed, 26 May 2010 19:26:28 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4QJQSoi037270; Wed, 26 May 2010 19:26:28 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005261926.o4QJQSoi037270@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 26 May 2010 19:26:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208580 - in stable/8/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 May 2010 19:26:28 -0000 Author: kib Date: Wed May 26 19:26:28 2010 New Revision: 208580 URL: http://svn.freebsd.org/changeset/base/208580 Log: MFC r208488: 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. Approved by: re (kensmith) Modified: stable/8/sys/kern/kern_resource.c stable/8/sys/kern/kern_thread.c stable/8/sys/sys/resourcevar.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/kern/kern_resource.c ============================================================================== --- stable/8/sys/kern/kern_resource.c Wed May 26 19:06:40 2010 (r208579) +++ stable/8/sys/kern/kern_resource.c Wed May 26 19:26:28 2010 (r208580) @@ -76,7 +76,7 @@ static void calcru1(struct proc *p, stru struct timeval *up, struct timeval *sp); static int donice(struct thread *td, struct proc *chgp, int n); static struct uidinfo *uilookup(uid_t uid); -static void ruxagg(struct proc *p, struct thread *td); +static void ruxagg_locked(struct rusage_ext *rux, struct thread *td); /* * Resource controls and accounting. @@ -1010,7 +1010,7 @@ ruadd(struct rusage *ru, struct rusage_e /* * Aggregate tick counts into the proc's rusage_ext. */ -void +static void ruxagg_locked(struct rusage_ext *rux, struct thread *td) { @@ -1022,7 +1022,7 @@ ruxagg_locked(struct rusage_ext *rux, st rux->rux_iticks += td->td_iticks; } -static void +void ruxagg(struct proc *p, struct thread *td) { Modified: stable/8/sys/kern/kern_thread.c ============================================================================== --- stable/8/sys/kern/kern_thread.c Wed May 26 19:06:40 2010 (r208579) +++ stable/8/sys/kern/kern_thread.c Wed May 26 19:26:28 2010 (r208580) @@ -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 Modified: stable/8/sys/sys/resourcevar.h ============================================================================== --- stable/8/sys/sys/resourcevar.h Wed May 26 19:06:40 2010 (r208579) +++ stable/8/sys/sys/resourcevar.h Wed May 26 19:26:28 2010 (r208580) @@ -131,7 +131,7 @@ void rucollect(struct rusage *ru, struc void rufetch(struct proc *p, struct rusage *ru); void rufetchcalc(struct proc *p, struct rusage *ru, struct timeval *up, struct timeval *sp); -void ruxagg_locked(struct rusage_ext *rux, struct thread *td); +void ruxagg(struct proc *p, struct thread *td); int suswintr(void *base, int word); struct uidinfo *uifind(uid_t uid);