Preemption Statistics Tool This patch instructs the preemptible kernel to generate and provide statistics on non-preemptible regions in the linux kernel. These regions correspond to held locks. The goal would be to find the worst-case locking times and do something about them. Requires preempt-kernel patch. Note if you are using this with the lock-break patch, one of the two will fail to patch on config.in -- it is a trivial hand edit. Use: Patch source. Enable CONFIG_PREEMPT_TIMES. Compile. Read /proc/latencytimes once to enable. Read /proc/latencytimes again for top 20 worst-case results. Each read clears the buffer.