From: David Dillow <dillowda@ornl.gov>
To: linux-kernel@vger.kernel.org
Cc: linux-btrace@vger.kernel.org, mingo@redhat.com, tglx@linutronix.de
Subject: Re: CONFIG_NO_HZ breaks blktrace timestamps
Date: Thu, 10 Jan 2008 15:25:52 -0500 [thread overview]
Message-ID: <1199996752.9159.46.camel@lap75545.ornl.gov> (raw)
In-Reply-To: <1199918912.8388.13.camel@lap75545.ornl.gov>
Ingo, Thomas added as I think this is related to
sched.c:__update_rq_clock()'s checking for forward time warps.
On Wed, 2008-01-09 at 17:48 -0500, David Dillow wrote:
> While trying to gain some insight into a disk issue, I found that
> blktrace/blkparse was giving me bogus traces -- I was seeing requests
> complete before they were even dispatched or queued even! I had thought
> that maybe this was an issue with SMP on the box, but when running with
> 'maxcpus=1', it told me that my 53 second test run only took 3.5
> seconds.
>
> I started tracking this down, and upon looking at cpu_clock(), and found
> that it uses sched_clock(), which is based on jiffies. At this point I
> had an ahah! moment and remembered that I had NO_HZ enabled.
[I did figure out that the sched_clock() jiffies implementation in
sched.c is a fallback.]
A few pieces of info I forgot in the original message -- this is on an
quad-processor, dual core Opteron box, running 2.6.24-rc7 x86_64. I'm
currently booting it with maxcpus=1, though at this point it is just a
hold-over from my initial bug hunting.
I can provide a full .config/dmesg if needed, but off the top:
CONFIG_NO_HZ=y
CONFIG_HZ=1000
CONFIG_CPU_FREQ is not set
CONFIG_CPU_IDLE makes no difference
hpet is the current clocksource
When booting with "nohz=off", rq->clock and rq->prev_clock_raw
from /proc/sched_debug track nicely with ktime_get() ("now is at ...
msecs"). rq->clock_overflows is non-zero, but increases relatively
slowly -- 650 for ~355 seconds.
With "nohz=on", rq->prev_clock_raw still tracks nicely with ktime_get(),
but rq->clock is moving very slowly and rq->clock_overflows is
incrementing fairly rapidly -- 53718 for ~357 seconds.
Either way gives a rq->max_delta of 0.999844 -- ms, I presume.
rq->clock_overflows is only incremented in sched.c:__update_rq_clock(),
and only when delta pushes clock more than TICK_NSEC past the current
tick_timestamp. I'm assuming this happens when the CPU's been idle for a
bit, with everything waiting for IO (4 to 5ms in the ticked blktrace),
so there's been no updates of rq->clock from sched_clock().
At the moment, I'm not sure how to track this farther, or how to fix it
properly. Any advice would be appreciated.
Thanks!
--
Dave Dillow
National Center for Computational Science
Oak Ridge National Laboratory
(865) 241-6602 office
next prev parent reply other threads:[~2008-01-10 20:28 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-09 22:48 David Dillow
2008-01-10 20:25 ` David Dillow [this message]
2008-01-10 22:44 ` Guillaume Chazarain
2008-01-11 3:04 ` David Dillow
2008-01-11 9:07 ` Jens Axboe
2008-01-11 9:23 ` Ingo Molnar
2008-01-11 9:25 ` Jens Axboe
2008-01-11 9:42 ` Ingo Molnar
2008-01-11 9:56 ` Jens Axboe
2008-01-11 10:29 ` [patch] block: fix " Ingo Molnar
2008-01-11 10:47 ` Guillaume Chazarain
2008-01-11 10:50 ` Ingo Molnar
2008-01-11 12:28 ` Jens Axboe
2008-01-11 12:42 ` Jens Axboe
2008-01-11 13:21 ` Ingo Molnar
2008-01-11 17:18 ` Jens Axboe
2008-01-14 7:51 ` Ingo Molnar
2008-01-14 7:59 ` Ingo Molnar
2008-01-14 8:10 ` Jens Axboe
2008-01-14 8:39 ` Christoph Hellwig
2008-01-14 8:42 ` Jens Axboe
2008-01-11 15:36 ` David Dillow
2008-01-11 16:44 ` Ingo Molnar
2008-01-11 17:26 ` Jens Axboe
2008-01-11 9:29 ` CONFIG_NO_HZ breaks " Ingo Molnar
2008-01-11 9:34 ` Jens Axboe
2008-01-11 9:28 ` nigel
2008-01-11 9:32 ` Ingo Molnar
2008-01-13 22:54 ` nigel
2008-01-11 9:44 ` Ingo Molnar
2008-01-11 9:51 ` Ingo Molnar
2008-01-11 10:41 ` Guillaume Chazarain
2008-01-11 10:55 ` Ingo Molnar
2008-01-11 22:30 ` Guillaume Chazarain
2008-01-12 0:03 ` Guillaume Chazarain
2008-01-11 9:34 ` Ingo Molnar
2008-01-11 15:43 ` David Dillow
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=1199996752.9159.46.camel@lap75545.ornl.gov \
--to=dillowda@ornl.gov \
--cc=linux-btrace@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--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
all inboxes | Powered by JetHome®