From owner-cvs-all@FreeBSD.ORG Thu Nov 29 06:34:30 2007 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F201C16A417; Thu, 29 Nov 2007 06:34:30 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0405013C43E; Thu, 29 Nov 2007 06:34:31 +0000 (UTC) (envelope-from peter@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 lAT6YUEh004270; Thu, 29 Nov 2007 06:34:30 GMT (envelope-from peter@repoman.freebsd.org) Received: (from peter@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id lAT6YUpr004269; Thu, 29 Nov 2007 06:34:30 GMT (envelope-from peter) Message-Id: <200711290634.lAT6YUpr004269@repoman.freebsd.org> From: Peter Wemm Date: Thu, 29 Nov 2007 06:34:30 +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/compat/linprocfs linprocfs.c src/sys/kern kern_clock.c src/sys/sys pcpu.h resource.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Nov 2007 06:34:31 -0000 peter 2007-11-29 06:34:30 UTC FreeBSD src repository Modified files: sys/compat/linprocfs linprocfs.c sys/kern kern_clock.c sys/sys pcpu.h resource.h Log: Move the shared cp_time array (counts %sys, %user, %idle etc) to the per-cpu area. cp_time[] goes away and a new function creates a merged cp_time-like array for things like linprocfs, sysctl etc. The atomic ops for updating cp_time[] in statclock go away, and the scope of the thread lock is reduced. sysctl kern.cp_time returns a backwards compatible cp_time[] array. A new kern.cp_times sysctl returns the individual per-cpu stats. I have pending changes to make top and vmstat optionally show per-cpu stats. I'm very aware that there are something like 5 or 6 other versions "out there" for doing this - but none were handy when I needed them. I did merge my changes with John Baldwin's, and ended up replacing a few chunks of my stuff with his, and stealing some other code. Reviewed by: jhb Partly obtained from: jhb Revision Changes Path 1.117 +16 -5 src/sys/compat/linprocfs/linprocfs.c 1.204 +72 -9 src/sys/kern/kern_clock.c 1.24 +2 -0 src/sys/sys/pcpu.h 1.32 +1 -1 src/sys/sys/resource.h