All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	linux-kernel@vger.kernel.org, Ingo Molnar <mingo@kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Francis Giraldeau <francis.giraldeau@gmail.com>
Subject: Re: [RFC PATCH] sched: Fix sched_wakeup tracepoint
Date: Fri, 05 Jun 2015 14:46:46 +0200	[thread overview]
Message-ID: <1433508406.1495.11.camel@twins> (raw)
In-Reply-To: <alpine.DEB.2.11.1506051430470.7723@nanos>

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 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. Analyzing wakup latencies depends on getting the wakeup
> > > chain right: which process is the waker, which is the wakee. Moving this
> > > instrumention outside of the waker context prevents trace analysis tools
> > > from getting the waker pid, either through "current" in the tracepoint
> > > probe, or by deducing it using other scheduler events based on the CPU
> > > executing the tracepoint.
> > > 
> > > Another side-effect of moving this instrumentation to the scheduler ipi
> > > is that the delay during which the wakeup is sitting in the pending
> > > queue is not accounted for when calculating wakeup latency.
> > > 
> > > Therefore, move the sched_wakeup instrumentation back to the waker
> > > context to fix those two shortcomings.
> > 
> > What do you consider wakeup-latency? I don't see how moving the
> > tracepoint into the caller will magically account the queue time.
> 
> Well, the point of wakeup is when the wakee calls wakeup. If the trace
> point is in the IPI then you account the time between the wakeup and
> the actuall handling in the IPI to the wakee instead of accounting it
> 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.


  parent reply	other threads:[~2015-06-05 12:47 UTC|newest]

Thread overview: 20+ 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-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
2015-06-05 12:32   ` Thomas Gleixner
2015-06-05 12:36     ` Mathieu Desnoyers
2015-06-05 12:46     ` Peter Zijlstra [this message]
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=1433508406.1495.11.camel@twins \
    --to=peterz@infradead.org \
    --cc=francis.giraldeau@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.