Date: Wed, 13 Jun 2001 12:54:33 -0700 (PDT) From: Poul-Henning Kamp <phk@freebsd.org> To: alpha@freebsd.org Subject: Re: followup on 8 way SMP pani Message-ID: <50505.992460174@critter>
next in thread | raw e-mail | index | archive | help
[ bounced from phk - jhb ] John just pointed out this thread on timecounters to me and I want to clarify some things. The timecounter hardware needs to be global. You cannot use the PCC or TSC of any single CPU unless they are in sync. If you do, you will see time going forward, backwards and sideways. Even on a i386 SMP box you cannot do this because of the various dirty things the BIOS will do in SMM mode. The alphas PCC is useless for timekeeping as anything but a short term interpolator. The clock is created with a on-chip SAW device which has no redeeming qualities whatsoever when it comes to keeping a stable frequency. The ultimate fallback for a SMP machine without suitable hardware is to implement the timecounter in software and tick it once per hardclock from one designated CPU. Your clock resolution will suck but everything will work as advertised. This is probably what should be done for the hardware you guys are talking about. Most of what you need is already there in kern_tc: it's called "dummy_timecounter" and is presently used to cover our behinds until we find real hardware. It might be possible to make some code which uses that basic method but which is able to interpolate using the local CPU's PCC, but so far all my attempts at doing so have had unacceptable high overheads. I have a rewrite of the timecounter code in mind, if you have input to that let me know. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50505.992460174>