Page 1 of 1

Does the APIC Timer frequency change with the CPU frequency?

Posted: Wed Dec 11, 2024 2:36 pm
by mrjbom
As I understand it, a processor can change its frequency during operation depending on load, temperature, and other factors. Does changing the frequency at which it is currently running affect the frequency used by APIC Timer or is it constant?

Re: Does the APIC Timer frequency change with the CPU frequency?

Posted: Wed Dec 11, 2024 9:31 pm
by Octocontrabass
The APIC timer frequency doesn't change when the CPU frequency changes, but it might stop when the CPU is stopped. You can check CPUID (leaf 6 EAX bit 2, ARAT).

Re: Does the APIC Timer frequency change with the CPU frequency?

Posted: Thu Dec 12, 2024 6:02 am
by mrjbom
Octocontrabass wrote: Wed Dec 11, 2024 9:31 pm The APIC timer frequency doesn't change when the CPU frequency changes
And can the timer frequency be different on other cores or do all cores have the same timer frequency?

Re: Does the APIC Timer frequency change with the CPU frequency?

Posted: Thu Dec 12, 2024 2:21 pm
by rdos
mrjbom wrote: Thu Dec 12, 2024 6:02 am
Octocontrabass wrote: Wed Dec 11, 2024 9:31 pm The APIC timer frequency doesn't change when the CPU frequency changes
And can the timer frequency be different on other cores or do all cores have the same timer frequency?
On the same CPU chip, they will likely have the same frequency, but when using multiple CPUs, then maybe not.

I think some early APIC designs did have issues with frequency dependency when using power-management and different frequencies, but they solved this so it should no longer be an issue.