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