Commit 749e5074 authored by Frederic Weisbecker's avatar Frederic Weisbecker

perf, sched migration: Handle ignored migrate out events

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: default avatarFrederic 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>
parent 880d22f2
...@@ -435,7 +435,10 @@ class TimeSlice: ...@@ -435,7 +435,10 @@ class TimeSlice:
self.__update_total_load(new_rq, in_rq) self.__update_total_load(new_rq, in_rq)
ts_list.append(self) 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): def wake_up(self, ts_list, pid, cpu, fork):
old_rq = self.prev.rqs[cpu] old_rq = self.prev.rqs[cpu]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment