public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Paul Mackerras <paulus@samba.org>, Nikhil Rao <ncrao@google.com>,
	Tom Zanussi <tzanussi@gmail.com>
Subject: [PATCH 04/12] perf, sched migration: Handle ignored migrate out events
Date: Mon,  2 Aug 2010 02:13:05 +0200	[thread overview]
Message-ID: <1280707993-6599-5-git-send-regression-fweisbec@gmail.com> (raw)
In-Reply-To: <1280707993-6599-1-git-send-regression-fweisbec@gmail.com>

Migrate out events may happen on tasks that are not in the
runqueue, for example this is the case for tasks that are
sleeping. In this case, we don't want to log the migrate out
event in the source runqueue because the task is not eventually
in the runqueue and we have already logged its sleep event.

This fixes timeslices that spuriously propagate a sleep event
from the previous timeslice.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Nikhil Rao <ncrao@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
---
 tools/perf/scripts/python/sched-migration.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/tools/perf/scripts/python/sched-migration.py b/tools/perf/scripts/python/sched-migration.py
index f73e1c7..7304d86 100644
--- a/tools/perf/scripts/python/sched-migration.py
+++ b/tools/perf/scripts/python/sched-migration.py
@@ -435,7 +435,10 @@ class TimeSlice:
 		self.__update_total_load(new_rq, in_rq)
 
 		ts_list.append(self)
-		self.event_cpus = [old_cpu, new_cpu]
+
+		if old_rq is not out_rq:
+			self.event_cpus.append(old_cpu)
+		self.event_cpus.append(new_cpu)
 
 	def wake_up(self, ts_list, pid, cpu, fork):
 		old_rq = self.prev.rqs[cpu]
-- 
1.6.2.3


  parent reply	other threads:[~2010-08-02  0:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-02  0:13 [GIT PULL] instrumentation updates Frederic Weisbecker
2010-08-02  0:13 ` [PATCH 01/12] perf: Use tracepoint_synchronize_unregister() to flush any pending tracepoint call Frederic Weisbecker
2010-08-02 15:14   ` Mathieu Desnoyers
2010-08-02  0:13 ` [PATCH 02/12] tracing: Drop cpparg() macro Frederic Weisbecker
2010-08-02  0:13 ` [PATCH 03/12] perf: New migration tool overview Frederic Weisbecker
2010-08-02  0:13 ` Frederic Weisbecker [this message]
2010-08-02  0:13 ` [PATCH 05/12] perf, sched migration: Ignore unhandled task states Frederic Weisbecker
2010-08-02  0:13 ` [PATCH 06/12] perf, sched migration: Fix key bindings Frederic Weisbecker
2010-08-02  0:13 ` [PATCH 07/12] perf, sched migration: Parameterize cpu height and spacing Frederic Weisbecker
2010-08-02  0:13 ` [PATCH 08/12] perf, sched migration: Make it vertically scrollable Frederic Weisbecker
2010-08-02  0:13 ` [PATCH 09/12] perf, sched migration: Make the GUI class client agnostic Frederic Weisbecker
2010-08-02  0:13 ` [PATCH 10/12] perf, sched migration: Librarize the GUI class Frederic Weisbecker
2010-08-02  0:13 ` [PATCH 11/12] perf, sched migration: Librarize task states and event headers helpers Frederic Weisbecker
2010-08-02  0:13 ` [PATCH 12/12] x86,mmiotrace: Add support for tracing STOS instruction Frederic Weisbecker
2010-08-02  6:28 ` [GIT PULL] instrumentation updates Ingo Molnar

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=1280707993-6599-5-git-send-regression-fweisbec@gmail.com \
    --to=fweisbec@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=ncrao@google.com \
    --cc=paulus@samba.org \
    --cc=tzanussi@gmail.com \
    /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