Martin Burnicki wrote: [] > I think a few notes are required here. > > The ntpd port for Windows does interpolate (or extrapolate?) between > the timer ticks. This has been in the NTP code base for a long time > and has _not_ been invented by Meinberg. And, just to recall, there > is no "Meinberg port", there is just "precompiled by Meinberg" > version which is based on the standard code.
I should have said "Meinberg package", and I did not say that you had invented the interpolation, but thanks for clarifying that point. > Timer tick interpolation is not based directly on RDTSC. It uses the > Windows Performance Counter API > (QueryPerformanceCounter/QueryPerformanceFrequency) to do so. Those > API calls are implemented in the Hardware Abstraction Layer (HAL), so > the exact way how it works depends on which of the different HALs > shipped with the OS is actually installed. I've found the calls in the source code. I alos use QueryPerformance in my own software and it's usually quite relaible. > AFAIK recent versions of Windows come with a couple of HAL > implementations, which can use different counters (HPET or whatever) > to implement the Performance Counter. Earlier versions (e.g. WNT/W2K) > came with only 2 HALs. One was installed on single processor systems > and used the standard timer chip (1.9 MHz clock rate) to implement > the performance counter. The other one was installed by default on > SMP machines or machines with dual core CPU (which in fact is similar > to SMP) and used the CPU TSC to implement the performance counter. > > While on legacy multiprocessor systems the CPU clocks (and thus the > TSC) may differ for each CPU, I'm _assuming_ that multicore CPUs are > clocked by the same source, so the TSCs should runs synchrounously. This assumption is probably wrong, as AMD (at least) have needed to issue a fix to synchronise the counters on the two cores (if I understand this correctly): http://www.amd.com/us-en/Processors/TechnicalResources/0,,30_182_871_13118,00.html => AMD Dual-Core Optimizer There's an implication that the OS may do this providing you don't call RDTSC. > Finally, the Windows port of ntpd also calls a Windows API to set the > thread affinty for the clock interpolation thread to the first CPU, > so it should not be required to specify a certain CPU to run on, as > proposed by Ryan. > > Martin Thanks for that clarification, Martin. Host helpful. Looking at the ntpd.exe process with Windows Task Manager under Vista, right-click Set Affinity, shows both CPU0 and CPU1 as being checked. I can't see how to confirm this using SysInternals Process Explorer. I'd welcome any performance comparison with my own data, or insight as to why the same system performs so much more poorly under Vista than under XP. Cheers, David _______________________________________________ questions mailing list questions@lists.ntp.org https://lists.ntp.org/mailman/listinfo/questions