From owner-cvs-src@FreeBSD.ORG Thu Jan 10 22:11:21 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C70D16A419; Thu, 10 Jan 2008 22:11:21 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 72DDD13C4DD; Thu, 10 Jan 2008 22:11:21 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m0AMBL4e018025; Thu, 10 Jan 2008 22:11:21 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from rwatson@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0AMBLTk018016; Thu, 10 Jan 2008 22:11:21 GMT (envelope-from rwatson) Message-Id: <200801102211.m0AMBLTk018016@repoman.freebsd.org> From: Robert Watson Date: Thu, 10 Jan 2008 22:11:21 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/kern init_main.c kern_proc.c kern_resource.c kern_synch.c src/sys/sys proc.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jan 2008 22:11:21 -0000 rwatson 2008-01-10 22:11:21 UTC FreeBSD src repository Modified files: sys/kern init_main.c kern_proc.c kern_resource.c kern_synch.c sys/sys proc.h Log: Don't zero td_runtime when billing thread CPU usage to the process; maintain a separate td_incruntime to hold unbilled CPU usage for the thread that has the previous properties of td_runtime. When thread information is requested using the thread monitoring sysctls, export thread td_runtime instead of process rusage runtime in kinfo_proc. This restores the display of individual ithread and other kernel thread CPU usage since inception in ps -H and top -SH, as well for libthr user threads, valuable debugging information lost with the move to try kthreads since they are no longer independent processes. There is universal agreement that we should rewrite the process and thread export sysctls, but this commit gets things going a bit better in the mean time. Likewise, there are resevations about the continued validity of statclock given the speed of modern processors. Reviewed by: attilio, emaste, jhb, julian Revision Changes Path 1.290 +4 -0 src/sys/kern/init_main.c 1.261 +13 -7 src/sys/kern/kern_proc.c 1.182 +3 -3 src/sys/kern/kern_resource.c 1.305 +4 -2 src/sys/kern/kern_synch.c 1.499 +1 -0 src/sys/sys/proc.h