From owner-cvs-all@FreeBSD.ORG Fri Nov 30 21:20:58 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 B495116A419; Fri, 30 Nov 2007 21:20:58 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from creme-brulee.marcuscom.com (penna-pt.tunnel.tserv1.fmt.ipv6.he.net [IPv6:2001:470:1f00:ffff::1279]) by mx1.freebsd.org (Postfix) with ESMTP id 6A24413C459; Fri, 30 Nov 2007 21:20:58 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from [IPv6:2001:470:1f00:2464::4] (shumai.marcuscom.com [IPv6:2001:470:1f00:2464::4]) by creme-brulee.marcuscom.com (8.14.1/8.14.1) with ESMTP id lAULLvHD031326; Fri, 30 Nov 2007 16:21:57 -0500 (EST) (envelope-from marcus@FreeBSD.org) From: Joe Marcus Clarke To: Peter Wemm In-Reply-To: <200711301248.37322.peter@wemm.org> References: <200711290634.lAT6YUpr004269@repoman.freebsd.org> <474EF1D5.7070103@FreeBSD.org> <200711301248.37322.peter@wemm.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-rSn5ZHY9P7P8i1XHX+dw" Organization: FreeBSD, Inc. Date: Fri, 30 Nov 2007 16:20:57 -0500 Message-Id: <1196457657.1769.10.camel@shumai.marcuscom.com> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 FreeBSD GNOME Team Port X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on creme-brulee.marcuscom.com Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org, Peter Wemm Subject: Re: 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: Fri, 30 Nov 2007 21:20:58 -0000 --=-rSn5ZHY9P7P8i1XHX+dw Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Fri, 2007-11-30 at 12:48 -0800, Peter Wemm wrote: > On Thursday 29 November 2007, Joe Marcus Clarke wrote: > > Peter Wemm wrote: > > > 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.=20 > > > 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. > > > > libgtop uses the cp_time interface. Can __FreeBSD_version be bumped > > for this? And thanks for doing this work. > > > > Joe >=20 > If it uses sysctl kern.cp_time, then there is no change required... >=20 > If you want to get the new per-cpu stats, then just test for the=20 > existence of kern.cp_times at runtime. There's no compile-time visible=20 > changes. But cpu_time from sys/resource.h did go away. As it turns out, I did convert libgtop to using sysctl instead of kvm a while ago, so this is moot. Joe >=20 --=20 Joe Marcus Clarke FreeBSD GNOME Team :: gnome@FreeBSD.org FreeNode / #freebsd-gnome http://www.FreeBSD.org/gnome --=-rSn5ZHY9P7P8i1XHX+dw Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQBHUH61b2iPiv4Uz4cRAt0nAKCsAeFmZYJwcfB+tWEHDWn3ANlf+ACfb/eM qjsbWAFsLGxD9bPeXhT37ZU= =U8mY -----END PGP SIGNATURE----- --=-rSn5ZHY9P7P8i1XHX+dw--