From owner-freebsd-hackers Fri Mar 15 10:22:10 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by hub.freebsd.org (Postfix) with ESMTP id 03BAC37B41B for ; Fri, 15 Mar 2002 10:21:56 -0800 (PST) Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.11.0/8.11.0) id g2FILVj14245; Fri, 15 Mar 2002 10:21:31 -0800 Date: Fri, 15 Mar 2002 10:21:31 -0800 From: Brooks Davis To: Josh Paetzel Cc: Terry Lambert , Matthew Emmerton , hackers@FreeBSD.ORG Subject: Re: Interesting sysctl variables in Mac OS X with hw info Message-ID: <20020315102130.B12416@Odin.AC.HMC.Edu> References: <006601c1cb06$b9f07370$1200a8c0@gsicomp.on.ca> <3C902B36.4D4EB8E@mindspring.com> <20020315100853.P287@twincat.vladsempire.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="+g7M9IMkV8truYOl" Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020315100853.P287@twincat.vladsempire.net>; from friar_josh@webwarrior.net on Fri, Mar 15, 2002 at 10:08:53AM +0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --+g7M9IMkV8truYOl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 15, 2002 at 10:08:53AM +0000, Josh Paetzel wrote: > This is a perfect example of, "Just because you can do something,=20 > doesn't mean you should." >=20 > I wouldn't see anything wrong with grabbing the clock frequency of the=20 > first cpu in the system and noting in the man page that if you have=20 > multiple cpus and you aren't running them at the same frequency, then=20 > the reported value is applicable only to the first cpu. >=20 > This would save a ton of time in implementing Jordan's ideas, at the=20 > cost of not being able to deal correctlywith a situation that=20 > (hopefully) isn't too common in the field. The other less tangible > disadvantage to my suggestion is that it takes us one step further in ou= r=20 > single-cpu-centric userland, ala top, uptime, and so forth only=20 > displaying stats for "one" cpu. That would be shortsighted and save nearly nothing. I certaintly would not have a problem with doing something lame in the first implementation like just looped over the number of CPUs to create identical (possiably wrong) per-cpu info. That would add maybe half a dozen lines of code and would be right in most cases. However, there's no telling what the future holds and mismatched CPUs might become more common with time so we should avoid intrenching poorly designed sysctls when they don't add much to the ease of implementation. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --+g7M9IMkV8truYOl Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8kjuqXY6L6fI4GtQRApFmAJ4lBkFk/dZHSPaf2iKsWxpFpTuJfwCfaj5c M2SyB4OOULTZq49yF9N3dfE= =mGus -----END PGP SIGNATURE----- --+g7M9IMkV8truYOl-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message