Re: [PATCH] Re: boot time, process start time, and NOW time

From: George Anzinger
Date: Thu Sep 02 2004 - 20:12:14 EST


OGAWA Hirofumi wrote:
George Anzinger <george@xxxxxxxxxx> writes:


OGAWA Hirofumi wrote:
Well, my machine says the result should be 996000000, so something is
wrong with your or my math.


Hmm.. I don't know why. I'm using x86 cpu machine.


As to if the initial jiffie value should
be a multiple of HZ, I don't see why. I think it is several counts
off of this value when the system wall clock is set in any case.


Ah, sorry for quite insufficiency explanation.

Since INITIAL_JIFFIES is -5 minutes, so I though tv.tv_nsec should be 0.
The cause of this is

INITIAL_JIFFIES % HZ (4294667296 % 1000)

because INITIAL_JIFFIES is unsigned long.

So, I guessed this is not intention.
Looks like this should be (-300*1000) % 1000.

What "should be"? Are you refering to some real code or some thoughts you had? I am not aware of the kernel converting INITIAL_JIFFIES to time ....

What do you think of this?

The actual initial value of jiffies is not important. The reason this value was chosen was to catch problems that occur when the unsigned value rolls over to zero (and several were found and fixed).

--
George Anzinger george@xxxxxxxxxx
High-res-timers: http://sourceforge.net/projects/high-res-timers/
Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml

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