[ntp:questions] effect of NTP on CPU_FREQ

Ulrich Windl Ulrich.Windl at RZ.Uni-Regensburg.DE
Fri Jul 16 07:27:25 UTC 2010


Lei Wang <coles555 at hotmail.com> writes:

> Hi,
>
> I did some measurement using NTP with Linux RTAI. The measurement is conducted using a GPS hooked up through serial port to the PC and using the 1PPS of the GPS to trigger an ISR to read both the TSC counter and TSC counter scaled to nanoseconds. The TSC counter can be scaled to nanoseconds by the following:
>
> rdtsc() * 1000000000 / tuned.cpu_freq
>
> where tuned.cpu_freq is equivalent to Linux CPU_FREQ (at least I think it is). The strange behavior I am seeing is that when NTP is running, the scaled nanoseconds within a second 'jumps' in the beginning and then stays fairly stable. Since the rdtsc() data I am recording indicate that it is stable and does not have any 'jump' I tend to believe that the CPU_FREQ is changed while NTP is running. The question I have here is whether or not NTP calibrates the CPU_FREQ during runtime? I thought it is only calibrated at system bootup and remains constant but the data I have seems to indicate otherwise. The specification of the PC is the following:

Hi!

I cannot help you much, but recent Linux kernels show the actual CPU
frequency in /proc/cpuinfo (for those CPU where the frequency can
change).

Ulrich


>
> Dell Optiplex GX240 with Ubuntu Linux distr. 2.6.28.7 with RTAI version 3.7.
>
>  
>
> Thanks and Regards,
>
> Lei
>
>  
>  		 	   		  
> _________________________________________________________________
> Hotmail: Trusted email with powerful SPAM protection.
> http://clk.atdmt.com/GBL/go/201469227/direct/01/




More information about the questions mailing list