Subject: Re: Proposed changes to cc_microset().
To: Alan Barrett <>
From: Frederick Bruckman <>
List: tech-kern
Date: 07/08/2004 09:59:27
On Thu, 8 Jul 2004, Alan Barrett wrote:

> While you are changing things in this area, it would be nice if you also
> added a way for cc_microtime and friends to be informed of deliberate
> changes in CPU speed (such as the i386 "Enhanced SpeedStep" stuff in
> sys/arch/i386/i386/est.c).
> I haven't worked out the details, but I think that it should be possible
> to add a function that gets called with both old and new nominal speeds
> when the CPU speed is changed, and that frobs the information in struct
> cpu_info to DTRT.

There really is no "nominal" speed: ci_tsc_freq is set at boot-up by 
averaging over a 10 tick interval, then not touched again. The ES code 
could do the same thing, then set ci_cc_denom = 0 to force ci_tsc_freq 
to be used until cc_microset() has a chance to do it's thing. At some 
point, when the confidence is high, we should probably update 
ci_tsc_freq, as it is used as a fallback at times.