From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@kernel.org>, rostedt <rostedt@goodmis.org>,
Francis Giraldeau <francis.giraldeau@gmail.com>
Subject: Re: [RFC PATCH] sched: Fix sched_wakeup tracepoint
Date: Tue, 9 Jun 2015 05:53:01 +0000 (UTC) [thread overview]
Message-ID: <2005583386.6872.1433829181079.JavaMail.zimbra@efficios.com> (raw)
In-Reply-To: <1433746530.1495.28.camel@twins>
----- On Jun 8, 2015, at 8:55 AM, Peter Zijlstra peterz@infradead.org wrote:
> On Fri, 2015-06-05 at 13:23 +0000, 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_activate - time@sched_wakeup
>
> One more thing, I think I would disagree with this. I would suggest
> never to use the 'wakeup' (or 'waking' in my proposal) for timing. I
> would suggest to use your interrupt tracepoint (or whatever else causes
> wakeup to be called for this).
The nice thing about the 'waking' tracepoint is that there is only
one to trace if we care about wakeup latency, and it only executes when
there is an actual wake up performed.
If we do care about more timing precision of the wakeup latency, we might
indeed want to trace both 'waking' and whatever calls it (interrupt, set
of system calls, etc.)
An instrumentation of 'waking' however seems like a good approximation
of the moment where the wakeup is requested by the waker. Especially
if we compute critical path of a computation: then we already account
for process runtime within the waker before the 'woken' event. So we
don't really care about the extra precision that we would get by tracing
the exact syscall entry point.
In all cases we need the wakee PID awakened by 'waking', which is
unavailable unless we add the 'waking' event.
>
> The wakeup times should be measured in tasktime -- of course, if
> interrupts/preemption are disabled then tasktime == walltime.
>
> The scheduling bit OTOH always needs to be measured in walltime, and is
> most affected by the presence of other tasks on the system.
>
> This too is why I'm not sure it makes sense to combine the two into a
> single measurement. They should be measured in different time domains.
That's a very good point! Agreed.
Thanks,
Mathieu
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
next prev parent reply other threads:[~2015-06-09 5:53 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-05 11:41 [RFC PATCH] sched: Fix sched_wakeup tracepoint Mathieu Desnoyers
2015-06-05 12:09 ` Peter Zijlstra
2015-06-05 12:32 ` Mathieu Desnoyers
2015-06-05 12:51 ` Peter Zijlstra
2015-06-05 13:23 ` Mathieu Desnoyers
2015-06-06 12:02 ` Peter Zijlstra
2015-06-07 10:20 ` Mathieu Desnoyers
2015-06-08 17:27 ` Steven Rostedt
2015-06-09 9:13 ` Peter Zijlstra
2015-06-09 18:48 ` Mathieu Desnoyers
2015-06-17 18:23 ` Cong Wang
2015-06-17 18:47 ` Steven Rostedt
2015-08-03 17:06 ` [tip:sched/core] sched: Introduce the 'trace_sched_waking' tracepoint tip-bot for Peter Zijlstra
2015-06-08 6:55 ` [RFC PATCH] sched: Fix sched_wakeup tracepoint Peter Zijlstra
2015-06-09 5:53 ` Mathieu Desnoyers [this message]
2015-06-05 12:32 ` Thomas Gleixner
2015-06-05 12:36 ` Mathieu Desnoyers
2015-06-05 12:46 ` Peter Zijlstra
2015-06-08 16:54 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2005583386.6872.1433829181079.JavaMail.zimbra@efficios.com \
--to=mathieu.desnoyers@efficios.com \
--cc=francis.giraldeau@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox