From owner-freebsd-hardware Sat Jul 7 4:22:30 2001 Delivered-To: freebsd-hardware@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 1D9CB37B401; Sat, 7 Jul 2001 04:22:23 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id VAA02645; Sat, 7 Jul 2001 21:22:19 +1000 Date: Sat, 7 Jul 2001 21:20:15 +1000 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Mike Smith Cc: Lars Eggert , Peter Pentchev , arch@FreeBSD.ORG, hardware@FreeBSD.ORG Subject: Re: New hw.cpuhz sysctl as per PR i386/27627 In-Reply-To: <200107062226.f66MQra02267@mass.dis.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hardware@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Fri, 6 Jul 2001, Mike Smith wrote: > > Mike Smith wrote: > > > > > CPU speeds aren't constants; this is probably not the right place to put > > > it. It also assumes there's only one CPU, which isn't acceptable. > > > > Being the author of the original patch, I agree that its a hack - but > > it's better than nothing :-) Plus, it doesn't necessarily assume only > > one CPU - it does assume they all have the same fixed speed though. > > It doesn't seem to serve much useful purpose; the information is already > available to the user in the boot-time message buffer, and it's not > useful as a number to a running process. The same information is already available to the user via the machdep.tsc_freq sysctl if there is a tsc, modulo bugs in the timecounter code (this sysctl is actually only available if there is a tsc AND the tsc timecounter was initialized at boot time). If there is no tsc, then machdep.tsc_freq fails properly but hw.cpuhz bogusly says that the frequency is 0. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hardware" in the body of the message