From owner-cvs-src@FreeBSD.ORG Fri Apr 11 08:47:36 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 D7DB41065672; Fri, 11 Apr 2008 08:47:36 +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 CC0748FC2C; Fri, 11 Apr 2008 08:47:36 +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 m3B8laiM078521; Fri, 11 Apr 2008 08:47:36 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from rwatson@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m3B8laAo078519; Fri, 11 Apr 2008 08:47:36 GMT (envelope-from rwatson) Message-Id: <200804110847.m3B8laAo078519@repoman.freebsd.org> From: Robert Watson Date: Fri, 11 Apr 2008 08:47:36 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_7 Cc: Subject: cvs commit: src/sys/sys proc.h src/sys/kern init_main.c kern_proc.c kern_resource.c kern_synch.c kern_thread.c 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: Fri, 11 Apr 2008 08:47:37 -0000 rwatson 2008-04-11 08:47:36 UTC FreeBSD src repository Modified files: (Branch: RELENG_7) sys/sys proc.h sys/kern init_main.c kern_proc.c kern_resource.c kern_synch.c kern_thread.c Log: Merge init_main.c:1.290, kern_proc.c:1.261, kern_resource.c:1.182, kern_sync.c:1.305, proc.h:1.499 from HEAD to RELENG_7: 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 Note: in MFC, td_incruntime is added to the end of struc thread, rather than the pre-zero'd section, and manually zero'd on thread creation, in order to avoid a negative ABI impact for third-party kernel modules. Revision Changes Path 1.283.2.3 +4 -0 src/sys/kern/init_main.c 1.252.2.8 +13 -7 src/sys/kern/kern_proc.c 1.180.2.2 +3 -3 src/sys/kern/kern_resource.c 1.302.2.1 +4 -2 src/sys/kern/kern_synch.c 1.255.2.3 +1 -0 src/sys/kern/kern_thread.c 1.491.2.3 +1 -0 src/sys/sys/proc.h