Re: [Patch] Re: Nasty suprise with uptime

Andreas Dilger (adilger@turbolabs.com)
Wed, 31 Oct 2001 16:56:09 -0700


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
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/

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