David, David J Taylor wrote: > Martin Burnicki wrote: >> 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
Seems you're right ;-) > 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. Hm, the process CPU affinity is not restricted to a single CPU. Ntpd has 4 active threads, and only the CPU affinity of the clock interpolation thread is restricted to the first CPU since this is the only thread which calls QueryPerformanceCounter() and thus potentially reads the TSC of the CPU it is running on. The other threads may still run on either CPU. I'm not aware of a tool which displays the CPU affinity of a single thread, so I don't know right now how you can verify this, except by looking at the source code. > 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. I've just set up a new test under Vista, so let's see. What I can say right now is that the default tick adjustment value is 156001 instead of 156250 which it used to be on earlier Windows versions. Also the granularity of the system clock has changed from 15.625 ms to 1 ms. Maybe the timer tick interpolation code is not quite appropriate for these settings. Martin -- Martin Burnicki Meinberg Funkuhren Bad Pyrmont Germany _______________________________________________ questions mailing list questions@lists.ntp.org https://lists.ntp.org/mailman/listinfo/questions