[Top] [All Lists]

Re: CONFIG_PRINTK_TIME and initial value for jiffies?

To: Sergei Shtylyov <>
Subject: Re: CONFIG_PRINTK_TIME and initial value for jiffies?
From: Tim Bird <>
Date: Mon, 22 May 2006 09:27:30 -0700
Cc: Herbert Valerio Riedel <>, Clem Taylor <>, Linux-MIPS <>
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <> <1147759399.11301.15.camel@localhost.localdomain> <>
User-agent: Thunderbird 1.5 (X11/20051201)
Sergei Shtylyov wrote:
>    sched_clock() defined in arch/i386/kernel/timers/timer_tsc.c can
> hardly provide 0-based time if it's using TSC (at least I can't see
> where the TSC is cleared). Even if it's not using TSC, jiffies_64 is not
> 0-based as we saw, and neither it's set to -300 secs because of the
> double cast to ulong and then to u64 which should clear the high word.
> Probably something somewhere clears TSC but I can see the related code
> only in arch/i386/kernel/smpboot.c...

I've worked a lot with the printk_times feature, and it's not unusual
on many systems to see weird values before time_init().  On x86 with a
TSC-based sched_clock() you may see values based on whatever
the TSC happens to be after firmware initialization up until time_init().

Note that you can re-base the timings to an arbitrary printk line
using scripts/show_delta.  See

Tim Bird
Architecture Group Chair, CE Linux Forum
Senior Staff Engineer, Sony Electronics

<Prev in Thread] Current Thread [Next in Thread>