From: Peter Zijlstra Date: Thu, 14 Mar 2013 09:48:39 +0000 (+0100) Subject: sched/tracing: Allow tracing the preemption decision on wakeup X-Git-Tag: MMI-PSA29.97-13-9~14492^2~25 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a8d7ad52a7befbde896276d05c75c90fed48b5bf;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git sched/tracing: Allow tracing the preemption decision on wakeup 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 Signed-off-by: Peter Zijlstra Acked-by: Steven Rostedt Acked-by: Paul Turner Cc: Mike Galbraith Link: http://lkml.kernel.org/r/1363254519.26965.9.camel@laptop Signed-off-by: Ingo Molnar --- diff --git a/kernel/sched/core.c b/kernel/sched/core.c index b36635e7404e..849deb96e61e 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -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