PIT vs. APIC Timer
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
PIT vs. APIC Timer
Everyone today seems to be using the PIT for counters and scheduling in their kernel. I've been doing a bit of reading on APIC, xAPIC and x2APIC and I thought about using the APIC Timer instead. I realize that this hardware is not always present, but if it's not, the PIT could be used instead. Doing it this way would give programmers (when APIC is present) an extra counter to use in their software (which would otherwise be used by the kernel). Any comments?
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]
Not quite true - I'm using the local APIC timers and have come across many others on this forum doing the same thing. In fact, using the local APIC makes sense, because you have a separate time source for each CPU, rather than scheduling everything from a single IRQ.Everyone today seems to be using the PIT for counters and scheduling in their kernel.
If you are designing primarily for x86_64, you can pretty much assume that a local APIC will be present.
Cheers,
Adam
- einsteinjunior
- Member
- Posts: 90
- Joined: Tue Sep 11, 2007 6:42 am
Hi,
Have a look at this topic, which is referenced from the APIC wiki article. It does still mean relying on the PIT initially.
Cheers,
Adam
Have a look at this topic, which is referenced from the APIC wiki article. It does still mean relying on the PIT initially.
Cheers,
Adam
- einsteinjunior
- Member
- Posts: 90
- Joined: Tue Sep 11, 2007 6:42 am
- einsteinjunior
- Member
- Posts: 90
- Joined: Tue Sep 11, 2007 6:42 am
What about laptops with constantly changing speeds? Or does this only affect the CPU speed, but not the bus speed the APIC speed is derived from?AJ wrote:Have a look at this topic, which is referenced from the APIC wiki article. It does still mean relying on the PIT initially.
JAL
- einsteinjunior
- Member
- Posts: 90
- Joined: Tue Sep 11, 2007 6:42 am
- einsteinjunior
- Member
- Posts: 90
- Joined: Tue Sep 11, 2007 6:42 am
I would certainly think it's possible - overclockers motherboards have been available for a while which allow you to change the FSB (am I using outdated terminology?) frequency, whilst keeping the PCI frequency unchanged.
As to whether laptops do this to save power, someone with more hardware knowlege needs to answer. Brendan, perhaps would know the answer?
Cheers,
Adam
As to whether laptops do this to save power, someone with more hardware knowlege needs to answer. Brendan, perhaps would know the answer?
Cheers,
Adam
Hi,
Note 2: AFAIK for hyper-transport the width of the link can also be changed.
Note 3: To reduce power consumption, I assume that for hyper-transport the width of the link is reduced while the frequency of the link remains the same (as this allows part of the link to be turned off completely, rather than remaining on while operating at a slower speed with the same power consumption at idle).
Note 4: For now, I'm guessing Intel's CSI will have similar characteristics to AMD's hyper-transport.
Basically, unless your OS includes a "motherboard driver" that's capable of changing the bus speed (using chipset specific magics), then it's safe to assume that the bus speed (and therefore the local APIC timer speed) is constant under all scenarios (including power management in laptops).
Cheers,
Brendan
IMHO it's safe to assume that the bus speed is either:AJ wrote:I would certainly think it's possible - overclockers motherboards have been available for a while which allow you to change the FSB (am I using outdated terminology?) frequency, whilst keeping the PCI frequency unchanged.
As to whether laptops do this to save power, someone with more hardware knowlege needs to answer. Brendan, perhaps would know the answer?
- - set to a fixed frequency via. motherboard jumpers (typical for old CPUs).
- set to a constant frequency by the BIOS (typical for newer CPUs). In this case it may be theoretically possible to change the bus speed via. software (e.g. some sort of motherboard driver).
Note 2: AFAIK for hyper-transport the width of the link can also be changed.
Note 3: To reduce power consumption, I assume that for hyper-transport the width of the link is reduced while the frequency of the link remains the same (as this allows part of the link to be turned off completely, rather than remaining on while operating at a slower speed with the same power consumption at idle).
Note 4: For now, I'm guessing Intel's CSI will have similar characteristics to AMD's hyper-transport.
Basically, unless your OS includes a "motherboard driver" that's capable of changing the bus speed (using chipset specific magics), then it's safe to assume that the bus speed (and therefore the local APIC timer speed) is constant under all scenarios (including power management in laptops).
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
The FSB can be changed independant of the PCI bus speed, which that can also be changed independant of a PCI-e 16's individual bus speed.
Also, some mobo's such as mine, allow you to drop/raise the cpu multiplier, so IMHO finding the default fixed values can sometimes be horribly incorrect.
Also, some mobo's such as mine, allow you to drop/raise the cpu multiplier, so IMHO finding the default fixed values can sometimes be horribly incorrect.
Website: https://joscor.com