Re: [RFC PATCH] sched: Fix sched_wakeup tracepoint

2015-06-17 Thread Steven Rostedt
On Wed, 17 Jun 2015 11:23:00 -0700 Cong Wang wrote: > On Tue, Jun 9, 2015 at 2:13 AM, Peter Zijlstra wrote: > > > > So how about we introduce the 'waking' tracepoint and leave the existing > > wakeup one in place and preserve its woken semantics. > > > > Steven, can we do aliases? Where one trac

Re: [RFC PATCH] sched: Fix sched_wakeup tracepoint

2015-06-17 Thread Cong Wang
On Tue, Jun 9, 2015 at 2:13 AM, Peter Zijlstra wrote: > > So how about we introduce the 'waking' tracepoint and leave the existing > wakeup one in place and preserve its woken semantics. > > Steven, can we do aliases? Where one tracepoint is known to userspace > under multiple names? In that case

Re: [RFC PATCH] sched: Fix sched_wakeup tracepoint

2015-06-09 Thread Mathieu Desnoyers
- On Jun 9, 2015, at 11:13 AM, Peter Zijlstra pet...@infradead.org wrote: > So how about we introduce the 'waking' tracepoint and leave the existing > wakeup one in place and preserve its woken semantics. That would work for me, but leaves me wondering how you would move to the new 'woken' na

Re: [RFC PATCH] sched: Fix sched_wakeup tracepoint

2015-06-09 Thread Peter Zijlstra
So how about we introduce the 'waking' tracepoint and leave the existing wakeup one in place and preserve its woken semantics. Steven, can we do aliases? Where one tracepoint is known to userspace under multiple names? In that case we could rename the thing to woken and have an alias wakeup which

Re: [RFC PATCH] sched: Fix sched_wakeup tracepoint

2015-06-08 Thread Mathieu Desnoyers
- On Jun 8, 2015, at 8:55 AM, Peter Zijlstra pet...@infradead.org wrote: > On Fri, 2015-06-05 at 13:23 +, Mathieu Desnoyers wrote: >> sched_wakeup: when try_to_wake_up{,_local} is called in the waker. >> sched_activate_task: when the wakee is marked runnable. >> sched_switch: when scheduli

Re: [RFC PATCH] sched: Fix sched_wakeup tracepoint

2015-06-08 Thread Steven Rostedt
[ Keeping entire email because I added Linus ] On Sun, 7 Jun 2015 10:20:14 + (UTC) Mathieu Desnoyers wrote: > - On Jun 6, 2015, at 2:02 PM, Peter Zijlstra pet...@infradead.org wrote: > > > On Fri, 2015-06-05 at 13:23 +, Mathieu Desnoyers wrote: > >> OK, so considering the definitio

Re: [RFC PATCH] sched: Fix sched_wakeup tracepoint

2015-06-08 Thread Steven Rostedt
On Fri, 05 Jun 2015 14:46:46 +0200 Peter Zijlstra wrote: > to the time between wakeup and sched switch. > > My point exactly, wake->schedule is what we call the scheduling latency, > not the wake latency, which would be from 'event' to the task being > runnable. Right, which means the tracepoi

Re: [RFC PATCH] sched: Fix sched_wakeup tracepoint

2015-06-07 Thread Peter Zijlstra
On Fri, 2015-06-05 at 13:23 +, Mathieu Desnoyers wrote: > sched_wakeup: when try_to_wake_up{,_local} is called in the waker. > sched_activate_task: when the wakee is marked runnable. > sched_switch: when scheduling actually happens. > > We can then calculate wakeup latency as > > time@sched

Re: [RFC PATCH] sched: Fix sched_wakeup tracepoint

2015-06-07 Thread Mathieu Desnoyers
- On Jun 6, 2015, at 2:02 PM, Peter Zijlstra pet...@infradead.org wrote: > On Fri, 2015-06-05 at 13:23 +, Mathieu Desnoyers wrote: >> OK, so considering the definition naming feedback you provided, we >> may need a 3 tracepoint if we want to calculate both wakeup latency >> and scheduling

Re: [RFC PATCH] sched: Fix sched_wakeup tracepoint

2015-06-06 Thread Peter Zijlstra
On Fri, 2015-06-05 at 13:23 +, Mathieu Desnoyers wrote: > OK, so considering the definition naming feedback you provided, we > may need a 3 tracepoint if we want to calculate both wakeup latency > and scheduling latency (naming ofc open to discussion): > > sched_wakeup: when try_to_wake_up{,_l

Re: [RFC PATCH] sched: Fix sched_wakeup tracepoint

2015-06-05 Thread Mathieu Desnoyers
- On Jun 5, 2015, at 2:51 PM, null wrote: > On Fri, 2015-06-05 at 12:32 +, Mathieu Desnoyers wrote: >> - On Jun 5, 2015, at 2:09 PM, Peter Zijlstra pet...@infradead.org wrote: >> >> > On Fri, Jun 05, 2015 at 01:41:49PM +0200, Mathieu Desnoyers wrote: >> >> Commit 317f394160e9 "sched:

Re: [RFC PATCH] sched: Fix sched_wakeup tracepoint

2015-06-05 Thread Peter Zijlstra
On Fri, 2015-06-05 at 12:32 +, Mathieu Desnoyers wrote: > - On Jun 5, 2015, at 2:09 PM, Peter Zijlstra pet...@infradead.org wrote: > > > On Fri, Jun 05, 2015 at 01:41:49PM +0200, Mathieu Desnoyers wrote: > >> Commit 317f394160e9 "sched: Move the second half of ttwu() to the remote > >> cp

Re: [RFC PATCH] sched: Fix sched_wakeup tracepoint

2015-06-05 Thread Peter Zijlstra
On Fri, 2015-06-05 at 14:32 +0200, Thomas Gleixner wrote: > On Fri, 5 Jun 2015, Peter Zijlstra wrote: > > On Fri, Jun 05, 2015 at 01:41:49PM +0200, Mathieu Desnoyers wrote: > > > Commit 317f394160e9 "sched: Move the second half of ttwu() to the remote > > > cpu" > > > moves ttwu_do_wakeup() to an

Re: [RFC PATCH] sched: Fix sched_wakeup tracepoint

2015-06-05 Thread Mathieu Desnoyers
- On Jun 5, 2015, at 2:32 PM, Thomas Gleixner t...@linutronix.de wrote: > On Fri, 5 Jun 2015, Peter Zijlstra wrote: >> On Fri, Jun 05, 2015 at 01:41:49PM +0200, Mathieu Desnoyers wrote: >> > Commit 317f394160e9 "sched: Move the second half of ttwu() to the remote >> > cpu" >> > moves ttwu_do_

Re: [RFC PATCH] sched: Fix sched_wakeup tracepoint

2015-06-05 Thread Thomas Gleixner
On Fri, 5 Jun 2015, Peter Zijlstra wrote: > On Fri, Jun 05, 2015 at 01:41:49PM +0200, Mathieu Desnoyers wrote: > > Commit 317f394160e9 "sched: Move the second half of ttwu() to the remote > > cpu" > > moves ttwu_do_wakeup() to an IPI handler context on the remote CPU for > > remote wakeups. This c

Re: [RFC PATCH] sched: Fix sched_wakeup tracepoint

2015-06-05 Thread Mathieu Desnoyers
- On Jun 5, 2015, at 2:09 PM, Peter Zijlstra pet...@infradead.org wrote: > On Fri, Jun 05, 2015 at 01:41:49PM +0200, Mathieu Desnoyers wrote: >> Commit 317f394160e9 "sched: Move the second half of ttwu() to the remote cpu" >> moves ttwu_do_wakeup() to an IPI handler context on the remote CPU f

Re: [RFC PATCH] sched: Fix sched_wakeup tracepoint

2015-06-05 Thread Peter Zijlstra
On Fri, Jun 05, 2015 at 01:41:49PM +0200, Mathieu Desnoyers wrote: > Commit 317f394160e9 "sched: Move the second half of ttwu() to the remote cpu" > moves ttwu_do_wakeup() to an IPI handler context on the remote CPU for > remote wakeups. This commit appeared upstream in Linux v3.0. > > Unfortunate

[RFC PATCH] sched: Fix sched_wakeup tracepoint

2015-06-05 Thread Mathieu Desnoyers
Commit 317f394160e9 "sched: Move the second half of ttwu() to the remote cpu" moves ttwu_do_wakeup() to an IPI handler context on the remote CPU for remote wakeups. This commit appeared upstream in Linux v3.0. Unfortunately, ttwu_do_wakeup() happens to contain the "sched_wakeup" tracepoint. Analyz