mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sched,trace: Allow tracing the preemption decision on wakeup
@ 2013-03-14  9:48 Peter Zijlstra
  2013-03-14 12:00 ` Steven Rostedt
  2013-03-18 11:09 ` [tip:sched/core] sched/tracing: " tip-bot for Peter Zijlstra
  0 siblings, 2 replies; 4+ messages in thread
From: Peter Zijlstra @ 2013-03-14  9:48 UTC (permalink / raw)
  To: mingo, tglx, Steven Rostedt; +Cc: Mike Galbraith, Paul Turner, LKML

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 <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
---
 kernel/sched/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index b36635e..849deb9 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



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] sched,trace: Allow tracing the preemption decision on wakeup
  2013-03-14  9:48 [PATCH] sched,trace: Allow tracing the preemption decision on wakeup Peter Zijlstra
@ 2013-03-14 12:00 ` Steven Rostedt
  2013-03-14 15:42   ` Paul Turner
  2013-03-18 11:09 ` [tip:sched/core] sched/tracing: " tip-bot for Peter Zijlstra
  1 sibling, 1 reply; 4+ messages in thread
From: Steven Rostedt @ 2013-03-14 12:00 UTC (permalink / raw)
  To: Peter Zijlstra; +Cc: mingo, tglx, Mike Galbraith, Paul Turner, LKML

On Thu, 2013-03-14 at 10:48 +0100, Peter Zijlstra wrote:
> 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 <tglx@linutronix.de>
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>

Acked-by: Steven Rostedt <rostedt@goodmis.org>

> ---
>  kernel/sched/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index b36635e..849deb9 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
> 



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] sched,trace: Allow tracing the preemption decision on wakeup
  2013-03-14 12:00 ` Steven Rostedt
@ 2013-03-14 15:42   ` Paul Turner
  0 siblings, 0 replies; 4+ messages in thread
From: Paul Turner @ 2013-03-14 15:42 UTC (permalink / raw)
  Cc: Peter Zijlstra, Ingo Molnar, tglx, Mike Galbraith, LKML

Yeah -- this one is a real no brainer to move; looks good :)

On Thu, Mar 14, 2013 at 5:00 AM, Steven Rostedt <rostedt@goodmis.org> wrote:
> On Thu, 2013-03-14 at 10:48 +0100, Peter Zijlstra wrote:
>> 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 <tglx@linutronix.de>
>> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
>
> Acked-by: Steven Rostedt <rostedt@goodmis.org>
>
>> ---
>>  kernel/sched/core.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
>> index b36635e..849deb9 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
>>
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [tip:sched/core] sched/tracing: Allow tracing the preemption decision on wakeup
  2013-03-14  9:48 [PATCH] sched,trace: Allow tracing the preemption decision on wakeup Peter Zijlstra
  2013-03-14 12:00 ` Steven Rostedt
@ 2013-03-18 11:09 ` tip-bot for Peter Zijlstra
  1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for Peter Zijlstra @ 2013-03-18 11:09 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, a.p.zijlstra, efault, pjt, peterz,
	rostedt, tglx

Commit-ID:  a8d7ad52a7befbde896276d05c75c90fed48b5bf
Gitweb:     http://git.kernel.org/tip/a8d7ad52a7befbde896276d05c75c90fed48b5bf
Author:     Peter Zijlstra <peterz@infradead.org>
AuthorDate: Thu, 14 Mar 2013 10:48:39 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 18 Mar 2013 10:18:08 +0100

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 <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Acked-by: Paul Turner <pjt@google.com>
Cc: Mike Galbraith <efault@gmx.de>
Link: http://lkml.kernel.org/r/1363254519.26965.9.camel@laptop
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 kernel/sched/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index b36635e..849deb9 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-03-18 11:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-14  9:48 [PATCH] sched,trace: Allow tracing the preemption decision on wakeup Peter Zijlstra
2013-03-14 12:00 ` Steven Rostedt
2013-03-14 15:42   ` Paul Turner
2013-03-18 11:09 ` [tip:sched/core] sched/tracing: " tip-bot for Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome