Date: Wed, 28 Feb 2007 11:26:24 -0800 From: Nate Lawson <nate@root.org> To: Poul-Henning Kamp <phk@phk.freebsd.dk> Cc: arch@freebsd.org, current@freebsd.org Subject: Re: PATCH - update TSC freq when cpufreq changes it Message-ID: <45E5D760.4030409@root.org> In-Reply-To: <42793.1172652152@critter.freebsd.dk> References: <42793.1172652152@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
Poul-Henning Kamp wrote: > In message <45E4ADCD.4090909@root.org>, Nate Lawson writes: > >> Attached is a patch that uses eventhandlers to update the TSC freq. > > Question: are we at a point where the TSC-frequency reported by ACPI > is more precise than our own ad-hoc calibrations ? It's a valid question, but mostly irrelevant. This code only comes into play after the TSC freq has been changed by a cpufreq driver. If the freq never changes, we always use the original boot-calibrated value. For example, if the freq went from 1600 to 800 mhz, the original value is off by 100% with the current code. The values supplied by the cpufreq driver are definitely going to be a lot closer. In the long term, I have some calibration code that bde@ helped with that gets a very accurate value but may take a while to reach equilibrium (since it runs with interrupts enabled). This would only run once in a task thread the first time a given freq is chosen. Then we'd cache that value for that setting. -- Nate
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45E5D760.4030409>