sched/tracing: Allow tracing the preemption decision on wakeup
authorPeter Zijlstra <[email protected]>
Thu, 14 Mar 2013 09:48:39 +0000 (10:48 +0100)
committerIngo Molnar <[email protected]>
Mon, 18 Mar 2013 09:18:08 +0000 (10:18 +0100)
Thomas noted that we do the wakeup preemption check after the
wakeup trace point, this means the tracepoint cannot test/report
this decision; which is rather important for latency sensitive
workloads. Therefore move the tracepoint after doing the
preemption check.

Suggested-by: Thomas Gleixner <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
Acked-by: Steven Rostedt <[email protected]>
Acked-by: Paul Turner <[email protected]>
Cc: Mike Galbraith <[email protected]>
Link: http://lkml.kernel.org/r/1363254519.26965.9.camel@laptop
Signed-off-by: Ingo Molnar <[email protected]>
kernel/sched/core.c

index b36635e7404e3cc8a6df4d56a83ab4a8c5466066..849deb96e61ed127e79f5aec83d7cd60002da048 100644 (file)
@@ -1288,8 +1288,8 @@ static void ttwu_activate(struct rq *rq, struct task_struct *p, int en_flags)
 static void
 ttwu_do_wakeup(struct rq *rq, struct task_struct *p, int wake_flags)
 {
-       trace_sched_wakeup(p, true);
        check_preempt_curr(rq, p, wake_flags);
+       trace_sched_wakeup(p, true);
 
        p->state = TASK_RUNNING;
 #ifdef CONFIG_SMP