public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Folkert van Heusden <folkert@vanheusden.com>
Cc: tim@physik3.uni-rostock.de, "Randy.Dunlap" <rdunlap@xenotime.net>,
	jesper.juhl@gmail.com, linux-kernel@vger.kernel.org
Subject: Re: printk timings stay weird, also waaay after 5 seconds
Date: Fri, 16 Sep 2005 17:15:56 -0400	[thread overview]
Message-ID: <1126905356.6675.11.camel@localhost.localdomain> (raw)
In-Reply-To: <20050916205541.GL17290@vanheusden.com>

On Fri, 2005-09-16 at 22:55 +0200, Folkert van Heusden wrote:
> by the way: ALSO after a COLD boot these values are high:
> [42949372.960000] Linux version 2.6.13.1 (root@thegate) (gcc version 4.0.1 (Debian 4.0.1-2)) #1 Wed Sep 14 11:56:45 CEST 2005
> [42949372.960000] BIOS-provided physical RAM map:
> [42949372.960000]  BIOS-e820: 0000000000000000 - 00000000000a0000 (usable)
> ...
> [42949376.200000] Freeing unused kernel memory: 140k freed
> [42949377.170000] NET: Registered protocol family 1
> [42949379.080000] Adding 497972k swap on /dev/hda1.  Priority:-1 extents:1
> [42949379.180000] EXT3 FS on hda2, internal journal
> ...
> [42949421.150000] pwc Dumping frame 39 (last message).
> [42949421.220000] pwc Dumping frame 38 (last message).
> [42949425.770000] eth1: no IPv6 routers present

[Added CC from a similar thread "early printk timings way off"]

It's using the jiffies counter, and converting that into seconds.
Jiffies are always set to roll over soon, so the times will be high at
start up.  If you switch to use the tsc as your timer (instead of HPET
or PM), you will get the time from tsc instead, and not only will they
be much smaller, but they will be much more precise (not the ms
resolution you have here, or is that 4ms resolution?).

Also, am I the only one that would prefer to always use the tsc (on x86)
for sched_clock when possible, no matter which timer I choose?  I
usually put in hacks to make sched_clock always return the tsc, since it
is much better to see how long something takes, instead of seeing five
printks with the same time.

-- Steve



      reply	other threads:[~2005-09-16 21:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-16 20:47 printk timings stay weird, also waaay after 5 seconds Folkert van Heusden
2005-09-16 20:55 ` Folkert van Heusden
2005-09-16 21:15   ` Steven Rostedt [this message]

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=1126905356.6675.11.camel@localhost.localdomain \
    --to=rostedt@goodmis.org \
    --cc=folkert@vanheusden.com \
    --cc=jesper.juhl@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@xenotime.net \
    --cc=tim@physik3.uni-rostock.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