Re: printk timings stay weird, also waaay after 5 seconds

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux