Time went backwards
Hi,
I have been experimenting with frequency scaling on a 4 core (2 sockets) AMD Opteron processors. The versions of Xen I have tested with include xen-testing as well as xen-unstable (cs 17042). For both these versions, I am using the linux 2.6.18-8 tree and have passed cpufreq=dom0-kernel to the xen command line.
However, I get plenty of "Time went backwards" whenever I attempt to change frequency. Does anyone know how this can be fixed?
% grep name /proc/cpuinfo | head -1
model name : Dual-Core AMD Opteron(tm) Processor 2216 HE
powernow-k8: error - out of sync, fix 0x10 0x10, vid 0xe 0xc
powernow-k8: error - out of sync, fix 0x10 0x2, vid 0xc 0x12 Timer ISR/2: Time went backwards: delta=-20028937 delta_cpu=19939076 shadow=44550204818 off=949766763 processed=45520000000 cpu_processed=45480031987
0: 45480000000
1: 45520031987
2: 45480031987
3: 45490031987
Timer ISR/3: Time went backwards: delta=-19936433 delta_cpu=20031580 shadow=44552171478 off=957893422 processed=45530000000 cpu_processed=45490031987
0: 45480000000
1: 45520031987
2: 45490031987
3: 45490031987
Timer ISR/0: Time went backwards: delta=-19953088 delta_cpu=30046912 shadow=45494036645 off=16011896 processed=45530000000 cpu_processed=45480000000
0: 45480000000
1: 45520031987
2: 45490031987
3: 45500031987
(lots more Time went backwards messages follow these)
Thanks,
Niraj
Quoted 6 lines · Niraj Tolia
I have been experimenting with frequency scaling on a 4 core (2 sockets) AMD Opteron processors. The versions of Xen I have tested with include xen-testing as well as xen-unstable (cs 17042). For both these versions, I am using the linux 2.6.18-8 tree and have passed cpufreq=dom0-kernel to the xen command line.
Quoted 8 lines
However, I get plenty of "Time went backwards" whenever I attempt to change frequency. Does anyone know how this can be fixed?
% grep name
/proc/cpuinfo| head -1
model name : Dual-Core AMD Opteron(tm) Processor 2216 HEpowernow-k8: error - out of sync, fix
0x100x10, vid0xe0xc
powernow-k8: error - out of sync, fix0x100x2, vid0xc0x12
Presumably you have cpufreq=dom0-kernel on your Xen command line? Apart from that noone else has reported 'out of sync' messages from the powernow driver. Mark may have some idea what that could be about.
-- Keir
Quoted 13 lines
Quoted 3 lines
I have been experimenting with frequency scaling on a 4 core (2 sockets) AMD Opteron processors. The versions of Xen I have tested with include xen-testing as well as xen-unstable (cs
17042). For both
Quoted 9 lines
these versions, I am using the linux 2.6.18-8 tree and have passed cpufreq=dom0-kernel to the xen command line.
However, I get plenty of "Time went backwards" whenever I attempt to change frequency. Does anyone know how this can be fixed?
% grep name
/proc/cpuinfo| head -1
model name : Dual-Core AMD Opteron(tm) Processor 2216 HE
Quoted 7 lines
Quoted 2 lines
powernow-k8: error - out of sync, fix
0x100x10, vid0xe0xc
powernow-k8: error - out of sync, fix0x100x2, vid0xc0x12Presumably you have cpufreq=dom0-kernel on your Xen command line? Apart from
that noone else has reported 'out of sync' messages from the powernow driver. Mark may have some idea what that could be about.
He's got a dual-core system, but the logical grouping of the cores doesn't match the physical grouping. Something like cores 0,1 share frequencies, but PowerNow! believes that cores 0 and 2 do. So when a frequency change on core 0 occurs, the Xen hypervisor gets alerted that cores 0 and 2 have new frequencies. This causes two errors with Xen - the HV believes core 1 has the old frequency, when it has the new frequency, and it believes core 2 has the new frequency, when it really has the old frequency. Time errors will accumulate rapidly.
Niraj -
Please email me privately. I have some more time to work on this issue and some new ideas on how to get information about it. Thanks!
-Mark Langsdorf
Operating System Research Center
AMD
Quoted 11 lines · Mark
He's got a dual-core system, but the logical grouping of the cores doesn't match the physical grouping. Something like cores 0,1 share frequencies, but PowerNow! believes that cores 0 and 2 do. So when a frequency change on core 0 occurs, the Xen hypervisor gets alerted that cores 0 and 2 have new frequencies. This causes two errors with Xen - the HV believes core 1 has the old frequency, when it has the new frequency, and it believes core 2 has the new frequency, when it really has the old frequency. Time errors will accumulate rapidly.
Quoted 4 lines
Niraj -
Please email me privately. I have some more time to work on this issue and some new ideas on how to get information about it.
An easy way would be to allocate a new bit in a CPUID hypervisor leaf to indicate that the PV guest can trust the core/thread information in the usual CPUID leaves. Then we could populate the affinity maps in a way similar to native Linux.
Or we could add a PV interface to obtain this information, which would be less x86 specific.
-- Keir