From: john stultz <johnstul@us.ibm.com>
To: Roman Zippel <zippel@linux-m68k.org>
Cc: Valdis.Kletnieks@vt.edu, Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org
Subject: Re: 2.6.17-mm2 hrtimer code wedges at boot?
Date: Wed, 28 Jun 2006 16:41:24 -0700 [thread overview]
Message-ID: <1151538084.5317.26.camel@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.64.0606281218130.12900@scrub.home>
On Wed, 2006-06-28 at 12:35 +0200, Roman Zippel wrote:
> Hi,
>
> On Tue, 27 Jun 2006, john stultz wrote:
>
> > > [ 92.087113] ACPI: CPU0 (power states: C1[C1] C2[C2])
> > > [ 92.087122] ACPI: Processor [CPU0] (supports 8 throttling states)
> > > [ 92.120270] ACPI: Thermal Zone [THM] (70 C)
> > > [ 72.242000] Time: acpi_pm clocksource has been installed.
> > >
> > > and the timestamps steps back about 20 seconds....
> >
> > Yea, that bit is expected. Basically the cpufreq driver is loading, and
> > when we detect cpufreq changes we mark the TSC as unstable and we fall
> > back to an alternative clocksource (acpi_pm in your case). At the same
> > time, sched_clock sees that the TSC is unstable and it falls back to
> > using jiffies, which causes the small jump in the printk timestamps.
>
> Frequency changes are IMO currently the most likely reason for this
> behaviour. If the cpu speeds down too much, the adjustment code might
> actually attempt to go backwards in time, the old adjustment code might
> have survived that, because it reacts slower to changes.
> The patch below should prevent this.
I agree cpufreq changes could be the source. However, things still
aren't making sense, since the accumulation is cycle based to begin
with, so any cpufreq caused drift in time won't be noticed until NTPd
starts adjusting the output from current_tick_len().
Vladis: I don't want to overwhelm you with patches to try, I think
Roman's debug patches should help show where the issue is. But if you've
got the time, try the patch below to quickly see if the cpufreq changes
are indeed causing the problem.
> Looking through the log file, I noticed other things:
>
> [ 17.942330] speedstep: frequency transition measured seems out of range (0 nSec), falling back to a safe one of 500000 nSec.
> ...
> [ 21.869356] Time: tsc clocksource has been installed.
>
> The speedstep code uses do_gettimeofday() but there is no real clock
> source installed, so it gets confused.
> IMO it would be better to install the PIT timer very early and later avoid
> switching to tsc at all, if there is any possibility of speed changes.
Hmm. Yea, while I'm not sure this is the issue at hand, it does look
like I need to get some of the boot ordering worked out here. Using the
PIT early on probably isn't the best solution as the 18us access latency
might not be the best for the transition calibration. Currently jiffies
is the default clocksource until late_initcall time, which was done to
minimize the clocksource churn at boot time. I'm not quite recalling
the details, but I think the motivation was to avoid confusion when
looking at the dmesg, so we could instead allow clocksources to be
selected as they load, but disable printing anything to dmesg until
after late_initcall.
I'll start working on that.
thanks
-john
This patch tries blocking the cpufreq changes to see if its causing the
accounting issue.
diff --git a/arch/i386/kernel/tsc.c b/arch/i386/kernel/tsc.c
index 7e0d8da..24af443 100644
--- a/arch/i386/kernel/tsc.c
+++ b/arch/i386/kernel/tsc.c
@@ -356,7 +356,7 @@ static int tsc_update_callback(void)
}
/* only update if tsc_khz has changed: */
- if (current_tsc_khz != tsc_khz) {
+ if (0 && current_tsc_khz != tsc_khz) {
current_tsc_khz = tsc_khz;
clocksource_tsc.mult = clocksource_khz2mult(current_tsc_khz,
clocksource_tsc.shift);
next prev parent reply other threads:[~2006-06-28 23:41 UTC|newest]
Thread overview: 80+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-24 13:19 2.6.17-mm2 Andrew Morton
2006-06-24 15:53 ` 2.6.17-mm2 Rafael J. Wysocki
2006-06-24 17:20 ` 2.6.17-mm2 Dave Jones
2006-06-24 21:34 ` 2.6.17-mm2 Andrew Morton
2006-06-25 8:51 ` 2.6.17-mm2 Rafael J. Wysocki
2006-06-25 10:22 ` 2.6.17-mm2 Andrew Morton
2006-06-25 15:16 ` 2.6.17-mm2 Andrew Morton
2006-06-25 18:23 ` 2.6.17-mm2 Sam Ravnborg
2006-06-25 18:40 ` 2.6.17-mm2 Andrew Morton
2006-06-25 21:21 ` 2.6.17-mm2 Sam Ravnborg
2006-06-30 7:38 ` 2.6.17-mm2 Randy.Dunlap
2006-07-02 10:11 ` 2.6.17-mm2 Russell King
2006-07-02 18:42 ` 2.6.17-mm2 Randy.Dunlap
2006-07-02 18:47 ` 2.6.17-mm2 Arjan van de Ven
2006-07-02 18:47 ` 2.6.17-mm2 Sam Ravnborg
2006-07-03 5:50 ` 2.6.17-mm2 Randy.Dunlap
2006-07-03 13:49 ` 2.6.17-mm2 Russell King
2006-06-25 19:19 ` 2.6.17-mm2 Rafael J. Wysocki
2006-06-26 20:13 ` 2.6.17-mm2 Chandra Seetharaman
2006-06-24 19:41 ` 2.6.17-mm2 Dominik Karall
2006-06-24 21:43 ` 2.6.17-mm2 Andrew Morton
2006-06-25 6:06 ` 2.6.17-mm2 Reuben Farrelly
2006-06-25 9:37 ` 2.6.17-mm2 Barry K. Nathan
2006-06-25 10:29 ` 2.6.17-mm2 Reuben Farrelly
2006-06-25 11:19 ` 2.6.17-mm2 Michal Piotrowski
2006-06-25 11:40 ` 2.6.17-mm2 Andrew Morton
2006-06-25 12:18 ` 2.6.17-mm2 Michal Piotrowski
2006-06-25 16:25 ` 2.6.17-mm2 (NULL pointer dereference) Dominik Karall
2006-06-25 17:18 ` Andrew Morton
2006-06-25 18:11 ` Dominik Karall
2006-06-25 16:47 ` 2.6.17-mm2: no QLA3YYY_NAPI help text Adrian Bunk
2006-06-25 19:32 ` 2.6.17-mm2: BLK_CPQ_CISS_DA=m error Adrian Bunk
2006-06-26 0:41 ` Vivek Goyal
2006-06-25 23:13 ` [-mm patch] make drivers/scsi/pata_it821x.c:it821x_passthru_dev_select() static Adrian Bunk
2006-06-25 23:27 ` Alan Cox
2006-06-27 1:03 ` Jeff Garzik
2006-06-25 23:13 ` [-mm patch] fs/cifs/cifsproto.h: remove #ifdef around small_smb_init_no_tc() prototype Adrian Bunk
2006-06-26 4:05 ` Steven French
2006-06-26 15:17 ` [-mm patch] drivers/scsi/arcmsr/: cleanups Adrian Bunk
2006-06-26 20:27 ` [-mm patch] drivers/md/raid5.c: remove an unused variable Adrian Bunk
2006-06-26 21:41 ` 2.6.17-mm2 hrtimer code wedges at boot? Valdis.Kletnieks
2006-06-26 22:50 ` Valdis.Kletnieks
2006-06-26 23:02 ` john stultz
2006-06-26 23:27 ` Thomas Gleixner
2006-06-27 2:12 ` Valdis.Kletnieks
2006-06-27 5:54 ` Thomas Gleixner
2006-06-27 10:16 ` Roman Zippel
2006-06-27 16:43 ` Valdis.Kletnieks
2006-06-27 17:10 ` Roman Zippel
2006-06-27 17:23 ` Roman Zippel
2006-06-27 19:07 ` Valdis.Kletnieks
2006-06-28 0:07 ` john stultz
2006-06-28 10:35 ` Roman Zippel
2006-06-28 11:44 ` Roman Zippel
2006-06-29 23:07 ` Valdis.Kletnieks
2006-06-30 19:26 ` john stultz
2006-06-30 21:04 ` Valdis.Kletnieks
2006-07-03 1:13 ` Roman Zippel
2006-07-03 1:56 ` Daniel Walker
2006-07-03 2:20 ` Valdis.Kletnieks
2006-07-03 20:08 ` john stultz
2006-07-03 19:59 ` john stultz
2006-07-04 22:21 ` Valdis.Kletnieks
2006-07-05 4:29 ` Valdis.Kletnieks
2006-07-06 0:37 ` Roman Zippel
2006-07-06 0:56 ` john stultz
2006-07-06 6:38 ` Valdis.Kletnieks
2006-07-06 0:51 ` john stultz
2006-07-06 1:12 ` john stultz
2006-07-06 5:43 ` john stultz
2006-07-06 20:33 ` Roman Zippel
2006-07-06 22:05 ` john stultz
2006-07-07 23:16 ` Roman Zippel
2006-07-08 20:02 ` [PATCH] adjust clock for lost ticks Roman Zippel
2006-07-09 21:25 ` john stultz
2006-06-28 23:41 ` john stultz [this message]
2006-06-29 11:24 ` 2.6.17-mm2 hrtimer code wedges at boot? Roman Zippel
2006-06-28 16:54 ` [-mm patch] include/asm-i386/acpi.h should #include <asm/processor.h> Adrian Bunk
2006-06-28 16:54 ` [-mm patch] fix sgivwfb compile Adrian Bunk
2006-06-28 16:54 ` [-mm patch] arch/i386/mach-visws/setup.c: remove dummy function calls Adrian Bunk
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=1151538084.5317.26.camel@localhost.localdomain \
--to=johnstul@us.ibm.com \
--cc=Valdis.Kletnieks@vt.edu \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zippel@linux-m68k.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox