All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
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: Sat, 06 Jun 2015 14:02:22 +0200	[thread overview]
Message-ID: <1433592142.1495.22.camel@twins> (raw)
In-Reply-To: <600031664.4911.1433510581646.JavaMail.zimbra@efficios.com>

On Fri, 2015-06-05 at 13:23 +0000, 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{,_local} is called in the waker.
> sched_activate_task: when the wakee is marked runnable.
> sched_switch: when scheduling actually happens.

I would propose:

	sched_waking: upon calling try_to_wake_up() as soon as we know we need
to change state; guaranteed to be called from the context doing the
wakeup.

	sched_woken: the wakeup is complete (task is runnable, any delay
between this and actually getting on a cpu is down to the scheduler).

	sched_switch: when switching from task @prev to @next.

This means abandoning trace_sched_wakeup(); which might be a problem,
which is why I bloody hate tracepoints :-(

> We can then calculate wakeup latency as
> 
>   time@sched_activate - time@sched_wakeup
> 
> And scheduling latency as
> 
>   time@sched_switch - time@sched_activate
> 
> In the case of critical path analysis, we don't care about this
> level of granularity. What we care about is is sum of the two,
> which we can express as:
> 
>   time@sched_switch - time@sched_wakeup
> 
> Is there an officially blessed name for this ?

No idea.

  reply	other threads:[~2015-06-06 12:02 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 [this message]
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-07 10:20           ` [RFC PATCH] sched: Fix sched_wakeup tracepoint Mathieu Desnoyers
2015-06-08  6:55         ` 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
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=1433592142.1495.22.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.