Debugging Linux Kernel using ftrace Part13 - Finding out maximum time interrupts are disabled
When interrupts are disabled, CPU cannot react to any external events:
irqsoff is a tracer which tracks the times in the kernel when interrupts are disabled. Whenever a new maximum latency is found, the tracer saves the trace leading up to that latency point. Each time a new maximum latency is reached, the old saved trace is discarded and the new trace is saved.
By default this tracer is not enabled in my kernel, I had to re-compile my linux kernel with the following kernel configuration: "CONFIG_IRQSOFF_TRACER"
You can see from the above screenshot, the maximum latency found was 644ms, started at _raw_spin_lock_irq. Also , 'tracing_max_latency' file also provides you the maximum latency when the interrupts are disabled.
Next time, trace file will be updated when it finds a latency greater than the value present in 'tracing_max_latency' file.
To reset the maximum latency, write '0' in 'tracing_max_latency' file.
echo 0 > tracing_max_latency
- timer interrupts
- mouse interrupts
irqsoff is a tracer which tracks the times in the kernel when interrupts are disabled. Whenever a new maximum latency is found, the tracer saves the trace leading up to that latency point. Each time a new maximum latency is reached, the old saved trace is discarded and the new trace is saved.
By default this tracer is not enabled in my kernel, I had to re-compile my linux kernel with the following kernel configuration: "CONFIG_IRQSOFF_TRACER"
You can see from the above screenshot, the maximum latency found was 644ms, started at _raw_spin_lock_irq. Also , 'tracing_max_latency' file also provides you the maximum latency when the interrupts are disabled.
Next time, trace file will be updated when it finds a latency greater than the value present in 'tracing_max_latency' file.
To reset the maximum latency, write '0' in 'tracing_max_latency' file.
echo 0 > tracing_max_latency
Comments
Post a Comment