Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1159881

Re: [RFC PATCH] sched: Fix sched_wakeup tracepoint

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [RFC PATCH] sched: Fix sched_wakeup tracepoint
Date Sat, 06 Jun 2015 14:10:01 +0200
Message-ID <pyl5f-7YP-1@gated-at.bofh.it> (permalink)
References <pxYim-7pU-9@gated-at.bofh.it> <pxYBI-82x-27@gated-at.bofh.it> <pxZ4L-9G-33@gated-at.bofh.it> <pxZo7-xg-39@gated-at.bofh.it> <pxZR8-1le-11@gated-at.bofh.it>
X-Original-To Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7BIT
X-Mailer Evolution 3.10.4-0ubuntu2
MIME-Version 1.0
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 45
Organization linux.* mail to news gateway
X-Original-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>
X-Original-Date Sat, 06 Jun 2015 14:02:22 +0200
X-Original-Message-ID <1433592142.1495.22.camel@twins>
X-Original-References <1433504509-17013-1-git-send-email-mathieu.desnoyers@efficios.com> <20150605120909.GG19282@twins.programming.kicks-ass.net> <479621151.4836.1433507522491.JavaMail.zimbra@efficios.com> <1433508695.1495.16.camel@twins> <600031664.4911.1433510581646.JavaMail.zimbra@efficios.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref aioe.org linux.kernel:1159881

Show key headers only | View raw


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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [RFC PATCH] sched: Fix sched_wakeup tracepoint Peter Zijlstra <peterz@infradead.org> - 2015-06-06 14:10 +0200

csiph-web