On St, 2008-08-13 at 22:17 +0200, Andi Kleen wrote:Milan Plzik <milan.plzik@xxxxxxxxx> writes:
I apologize for replying on my own mail (and also for top-posting, butThis usually means it is using the wrong timer in a deeper idle state.
this information is global update, not exactly fitting any of topics
mentioned below).
After playing for a longer while I found out that the system ends
sometimes in state where, in order to do anything useful, I need to
press keys on keyboard.
Some idle states cannot be woken up by e.g. the APIC timer and then
you get that effect: you only make progress when you wake up the CPU in some other way like pressing a key. Then on wake up the
timers get processed.
This is usually a bug in the kernel timer selection. It should be chosing
a timer that always wakes up from the deepest idle state used.
Last days I also considered this option; I tried all possible timers (hpet, tsc, acpi_pm), but their behavior is the same. 'jiffies' timer works correctly, but that one doesn't seem to put CPU to deeper sleeps, so we can't deduce any information from that.
I've seen some workaround in drivers/acpi/processor_idle.c, which seems to check the ARCH_APICTIMER_STOPS_ON_C3 macro, but it's enabled at compilation time, so the code is used by kernel... .