1

I'm trying to use the local APIC timer to send interrupts after a certain interval (for a kernel module I am writing). This is not related to scheduling in Linux.

I set the clocksource in Linux to HPET so that I could free up the local APIC timer for my own use. However, whenever I write to the local APIC timer's registers, it seems that not only do my values get overwritten shortly after by different code in the kernel, but the watchdog timer goes off.

Does anyone know why this is happening? How can I free up the local APIC timer for myself? I assumed that when clocksource is tsc, the local APIC timer is used for scheduling, but perhaps this assumption is wrong.

$ cat /sys/devices/system/clocksource/clocksource0/current_clocksource hpet

  • Do you have active watchdogs in the normal configuration or sound configured? – Rui F Ribeiro Feb 15 at 8:36
  • @RuiFRibeiro It's the NMI watchdog I think. Is that something that could be affected by this? – abcd Feb 15 at 8:53
  • I am quite sure sound programs the APIC, not so sure about the NMI watchdog. Cannot remember the specifics of that chipset, and without time to double check it now. – Rui F Ribeiro Feb 15 at 8:55
  • @RuiFRibeiro Thanks, I will look into it and get back to you. – abcd Feb 15 at 9:00
  • @RuiFRibeiro By the way, am I correct in assuming that when clocksource is tsc Linux uses the local APIC timer to send timer interrupts? – abcd Feb 15 at 9:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.