Re: [Patch] Re: Nasty suprise with uptime

Andreas Dilger
2001-10-31T23:56:44Z

On Oct 31, 2001 23:58 +0100, Tim Schmielau wrote:
> Next step would be to decide what to do with the start_time field of
> struct task_struct, which is still 32 bit and stores seconds times HZ.
> Other uses for 64 bit jiffies might be identified as well.

I would say that (excluding stability issues because of jiffies wrap)
that this is ready for submission to Linus. He may be of the mind that
he would rather fix the wrap issues sooner rather than later, or he
may want to minimize disruption during the "VM stabilize" period (there
are still a couple of hang issues apparently).

> +u64 get_jiffies64(void)
> +{
> + static unsigned long jiffies_hi = 0;
> + static unsigned long jiffies_last = INITIAL_JIFFIES;
> + static unsigned long jiffies_tmp;
^^^^^^ jiffies_tmp doesn't need to be static.

One suggestion someone had was to put dummy "get_jiffies64()" calls
in some other infrequently used areas to ensure jiffies_hi is valid
if we don't call uptime for 1.3 years after the first wrap. I don't
know if that matters or not.

Cheers, Andreas
--
Andreas Dilger