aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorCarsten Emde <C.Emde@osadl.org>2012-07-11 22:05:19 +0000
committerSteven Rostedt <rostedt@rostedt.homelinux.com>2013-03-22 10:07:20 -0400
commitfeca7115a72ba5a999689968b4fe16e358e07484 (patch)
treeb077a78a49dc69b0a3b9e04a6dfdf781d834a84b /kernel
parent13808375eb8603c130a8476cf044d079cedc3607 (diff)
Latency histograms: Detect another yet overlooked sharedprio condition
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 <C.Emde@osadl.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/latency_hist.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/trace/latency_hist.c b/kernel/trace/latency_hist.c
index d514eefd5ac8..6a4c8694c55a 100644
--- a/kernel/trace/latency_hist.c
+++ b/kernel/trace/latency_hist.c
@@ -935,6 +935,9 @@ static notrace void probe_wakeup_latency_hist_stop(void *v,
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.