]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Use value -1 instead of 0 for marking unused APIC vectors. This fixes
authormav <mav@FreeBSD.org>
Fri, 1 May 2009 17:05:49 +0000 (17:05 +0000)
committermav <mav@FreeBSD.org>
Fri, 1 May 2009 17:05:49 +0000 (17:05 +0000)
commit364f1b1af00c2b41d21e61843b6a05aace8247e7
tree8ca34a2f3317adc2d6844c629e5440bf1e45ef15
parentdca50049ce746bdf7f10117a8dd8d72c8282585c
Use value -1 instead of 0 for marking unused APIC vectors. This fixes
IRQ0 routing on LAPIC-enabled systems.

Add hint.apic.0.clock tunable. Setting it 0 disables using LAPIC timers
as hard-/stat-/profclock sources falling back to using i8254 and rtc timers.

On modern CPUs LAPIC is a part of CPU core which is shutting down when CPU
enters C3 or deeper power state. It makes no problems for interrupt
processing, as chipset wakes up CPU on interrupt triggering. But entering
C3 state kills LAPIC timer and freezes system time, making C3 and deeper
states practically unusable. Using i8254 timer allows to avoid this
problem.

By using i8254 timer my T7700 C2D CPU with UP kernel successfully enters
C3 state, saving more then a Watt of total idle power (>10%) in addition to
all other power-saving techniques.

This technique is not working for SMP yet, as only one CPU receives
timer interrupts. But I think that problem could be fixed by forwarding
interrupts to other CPUs with IPI.
sys/amd64/amd64/local_apic.c
sys/i386/i386/local_apic.c