linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org,
	linux-rt-users <linux-rt-users@vger.kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Carsten Emde <C.Emde@osadl.org>, John Kacur <jkacur@redhat.com>
Subject: [PATCH RT 04/12] Latency histograms: Detect another yet overlooked sharedprio condition
Date: Tue, 17 Jul 2012 11:31:19 -0400	[thread overview]
Message-ID: <20120717153243.340760961@goodmis.org> (raw)
In-Reply-To: 20120717153115.606116459@goodmis.org

[-- Attachment #1: 0004-Latency-histograms-Detect-another-yet-overlooked-sha.patch --]
[-- Type: text/plain, Size: 1159 bytes --]

From: Carsten Emde <C.Emde@osadl.org>

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>
---
 kernel/trace/latency_hist.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/kernel/trace/latency_hist.c b/kernel/trace/latency_hist.c
index d514eef..6a4c869 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.
-- 
1.7.10.4

  parent reply	other threads:[~2012-07-17 15:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-17 15:31 [PATCH RT 00/12] [ANNOUNCE] 3.4.4-rt14-rc2 stable review Steven Rostedt
2012-07-17 15:31 ` [PATCH RT 01/12] Latency histogramms: Cope with backwards running local trace clock Steven Rostedt
2012-07-17 15:31 ` [PATCH RT 02/12] Latency histograms: Adjust timer, if already elapsed when programmed Steven Rostedt
2012-07-17 15:31 ` [PATCH RT 03/12] Disable RT_GROUP_SCHED in PREEMPT_RT_FULL Steven Rostedt
2012-07-17 15:31 ` Steven Rostedt [this message]
2012-07-17 15:31 ` [PATCH RT 05/12] slab: Prevent local lock deadlock Steven Rostedt
2012-07-17 15:31 ` [PATCH RT 06/12] fs, jbd: pull your plug when waiting for space Steven Rostedt
2012-07-17 15:31 ` [PATCH RT 07/12] perf: Make swevent hrtimer run in irq instead of softirq Steven Rostedt
2012-07-17 15:31 ` [PATCH RT 08/12] cpu/rt: Rework cpu down for PREEMPT_RT Steven Rostedt
2012-07-17 15:31 ` [PATCH RT 09/12] cpu/rt: Fix cpu_hotplug variable initialization Steven Rostedt
2012-07-17 15:31 ` [PATCH RT 10/12] workqueue: Revert workqueue: Fix PF_THREAD_BOUND abuse Steven Rostedt
2012-07-17 15:31 ` [PATCH RT 11/12] workqueue: Revert workqueue: Fix cpuhotplug trainwreck Steven Rostedt
2012-07-17 15:31 ` [PATCH RT 12/12] Linux 3.4.4-rt14-rc2 Steven Rostedt
  -- strict thread matches above, loose matches on Subject: below --
2012-07-18 22:39 [PATCH RT 00/12] [ANNOUNCE] 3.0.36-rt58-rc1 stable review Steven Rostedt
2012-07-18 22:39 ` [PATCH RT 04/12] Latency histograms: Detect another yet overlooked sharedprio condition Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120717153243.340760961@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=C.Emde@osadl.org \
    --cc=jkacur@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).