While waiting for an RT process to be woken up, the previous process may go to wait and switch to another one with the same priority which then becomes current. This condition was not correctly recognized and led to erroneously high latency recordings during periods of low CPU load. This patch correctly marks such latencies as sharedprio and prevents them from being recorded as actual system latency. Signed-off-by: Carsten Emde Signed-off-by: Thomas Gleixner --- kernel/trace/latency_hist.c | 3 +++ 1 file changed, 3 insertions(+) Index: linux-3.4.2-rt10-64+/kernel/trace/latency_hist.c =================================================================== --- linux-3.4.2-rt10-64+.orig/kernel/trace/latency_hist.c +++ linux-3.4.2-rt10-64+/kernel/trace/latency_hist.c @@ -935,6 +935,9 @@ static notrace void probe_wakeup_latency goto out; } + if (current->prio == cpu_wakeup_task->prio) + per_cpu(wakeup_sharedprio, cpu) = 1; + /* * The task we are waiting for is about to be switched to. * Calculate latency and store it in histogram. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/