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

Re: kernel console timestamps behaving oddly on 2.6.26-1-ip4xx (on an NSLU2)?



Hi all!

On Tuesday 26 August 2008, Daniel Kahn Gillmor wrote:
> Hey folks--
> 
...
> Why would the number jump from 0 to 42949372.96?  I can't help but
> notice that this is exactly 2^32 - 30000 jiffies, if a jiffy is
> 1/100th of a second.  It looks like some internal unsigned jiffy
> counter is overflowing somehow, or being rolled backward by 30000
> jiffies.  What does this mean?  It seems to me like this is going to
> cause an internal counter overflow 300 seconds after boot.  This does
> not happen on an x86 system i've got running 2.6.26-1-686.

This seems strange, but this is normal behaviour. When booting, the time is set
to zero before jiffies are initialized (tick timer).

jiffies are initialized to -5 minutes (5*60*HZ). The jiffies counter *will*
overflow after 5 minutes, for verifying that there is no overflow problems with
jiffies.

However, I can't explain why we don't see that on x86. Perhaps the timer are
initialized sooner, but this should be verified.

> 
> 0 igor:~# head -n20 /var/log/kern.log
> Aug 26 16:21:25 igor kernel: Kernel logging (proc) stopped.
> Aug 26 16:21:25 igor kernel: Kernel log daemon terminating.
> Aug 26 16:23:09 igor kernel: klogd 1.5.0#5, log source = /proc/kmsg started.
<--- starting kernel boot, cpu, mmu, memory, ... are initialized, no time yet --->
> Aug 26 16:23:09 igor kernel: [    0.000000] Initializing cgroup subsys cpu
> Aug 26 16:23:09 igor kernel: [    0.000000] Linux version 2.6.26-1-ixp4xx (Debian 2.6.26-3) (waldi@debian.org) (gcc version 4.1.3 20080623 (prerelease) (Debian 4.1.2-23)) #1 Thu Aug 21 09:59:59 UTC 2008
> Aug 26 16:23:09 igor kernel: [    0.000000] CPU: XScale-IXP42x Family [690541f1] revision 1 (ARMv5TE), cr=0000397f
...
> Aug 26 16:23:09 igor kernel: [    0.000000] CPU0: I cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets
> Aug 26 16:23:09 igor kernel: [    0.000000] CPU0: D cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets
<--- timer is initialized --->
> Aug 26 16:23:09 igor kernel: [42949372.960000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
> Aug 26 16:23:09 igor kernel: [42949372.960000] Kernel command line: console=ttyS0,115200 rtc-x1205.probe=0,0x6f noirqdebug
> Aug 26 16:23:09 igor kernel: [42949372.960000] Unknown boot option `rtc-x1205.probe=0,0x6f': ignoring
> 
> Thanks for any insight,
> 
>        --dkg
> 

Best regards

Marc



see also : "CONFIG_PRINTK_TIME and generic sched_clock" on the linux arm kernel
mailing list : http://thread.gmane.org/gmane.linux.ports.arm.kernel/43070



Reply to: