From: David Ahern <dsahern@gmail.com>
To: Pekka Enberg <penberg@iki.fi>,
acme@ghostprotocols.net, linux-kernel@vger.kernel.org
Cc: namhyung@kernel.org, Ingo Molnar <mingo@kernel.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Mike Galbraith <efault@gmx.de>, Jiri Olsa <jolsa@redhat.com>,
Stephane Eranian <eranian@google.com>,
Pekka Enberg <penberg@kernel.org>
Subject: Re: [PATCH 1/2] perf sched: Introduce timehist command - v2
Date: Mon, 02 Dec 2013 09:19:22 -0700 [thread overview]
Message-ID: <529CB30A.1030306@gmail.com> (raw)
In-Reply-To: <529C53D2.8020203@iki.fi>
[-- Attachment #1: Type: text/plain, Size: 303 bytes --]
On 12/2/13, 2:33 AM, Pekka Enberg wrote:
> I'm seeing rather large "sch delay" numbers on Fedora 19's default
> kernel that seem like a data error of some sort:
>
> 4500.663117 [02] fix_client[7216] 0.007
> 18446744073708.033 1.786
Does this address the large numbers for you?
David
[-- Attachment #2: timehist-check-ready-time.patch --]
[-- Type: text/plain, Size: 718 bytes --]
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index abcb40a44151..ae71782064ac 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -1751,8 +1751,12 @@ static void timehist_update_runtime_stats(struct thread_runtime *r,
r->dt_between = 0;
if (tprev) {
r->dt_run = t - tprev;
- if (r->ready_to_run)
- r->dt_delay = tprev - r->ready_to_run;
+ if (r->ready_to_run) {
+ if (r->ready_to_run > tprev)
+ pr_debug("time travel: wakeup time for task > previous sched_switch event\n");
+ else
+ r->dt_delay = tprev - r->ready_to_run;
+ }
if (r->last_time > tprev)
pr_debug("time travel: last sched out time for task > previous sched_switch event\n");
next prev parent reply other threads:[~2013-12-02 16:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-02 0:23 [PATCH 0/2] perf: sched timehist command - v2 David Ahern
2013-12-02 0:23 ` [PATCH 1/2] perf sched: Introduce " David Ahern
2013-12-02 7:58 ` Namhyung Kim
2013-12-02 14:28 ` David Ahern
2013-12-02 9:33 ` Pekka Enberg
2013-12-02 14:33 ` David Ahern
2013-12-02 16:19 ` David Ahern [this message]
2013-12-02 0:23 ` [PATCH 2/2] perf sched: Add documentation for timehist options David Ahern
2013-12-02 6:07 ` Srikar Dronamraju
2013-12-02 12:38 ` Ingo Molnar
2013-12-02 7:41 ` Namhyung Kim
2013-12-02 14:37 ` David Ahern
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=529CB30A.1030306@gmail.com \
--to=dsahern@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=efault@gmx.de \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=penberg@iki.fi \
--cc=penberg@kernel.org \
/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.