I have a simple kernel interrupt that is triggered by a GPIO-input. The IRQ just exits after being called. When I turn the frequency of the interrupts up to somewhere around 10-20 kHz, the system (BeagleBone Black from PuTTY) becomes unresponsive. I measure the CPU-load using
top,
mpstat and
iostat while turning the frequency up, but there are no significant change in any of the metrics.
So the processor CPU gets loaded, but I can't measure it!
How is top making its measurement? How come the very frequent interrupt isn't visible?
How can I measure the impact the interrupt has on the overall performance of the system?
EDIT:
Even "mpstat -I SUM" which is suppose to "Report interrupts statistics", doesn't change its metrics when changing the interrupt frequency significantly. The source code of the kernel module that im running, can be found here:
Derek Molloy - See listing 4
My interrupt IRQ looks like this:
Code:
static irq_handler_t ebbgpio_irq_handler(unsigned int irq, void *dev_id, struct pt_regs *regs){
return (irq_handler_t) IRQ_HANDLED; // Announce that the IRQ has been handled correctly
}
2. EDIT
The
intr/s value of mpstat does infact scale with the interrupt frequency. It shows 860.90 at an interrupt frequency on 1 Hz, and 1959.68 at an interrupt frequency on 150kHz.
By setting the CPU-frequency governor to "performance", and setting the frequency to static 1GHz, I was able to get the interrupt frequency up to 150kHz, before the processor crashed..