Re: [Patch] Re: Nasty suprise with uptime

Tim Schmielau (tim@physik3.uni-rostock.de)
Wed, 31 Oct 2001 19:35:47 +0100 (CET)


Sorry, I forgot to set INITIAL_JIFFIES to zero before posting the patch.

Testing with high INITIAL_JIFFIES values unfortunately still discloses
instability after the wraparound even for an otherwise unpatched kernel.

I also forgot to mention that the introduced jiffies_high variable is
useless on 64 bit systems, so we might #ifdef it out there.

Tim

On Wed, 31 Oct 2001, Tim Schmielau wrote:

[parts of patch snipped]

> --- kernel/timer.c.orig Wed Oct 31 17:24:36 2001
> +++ kernel/timer.c Wed Oct 31 18:38:47 2001
> @@ -65,7 +65,9 @@
>
> extern int do_setitimer(int, struct itimerval *, struct itimerval *);
>
> -unsigned long volatile jiffies;
> +#define INITIAL_JIFFIES 0xFFFFD000ul
> +unsigned long volatile jiffies = INITIAL_JIFFIES;
> +unsigned long volatile jiffies_high, jiffies_high_shadow;
>

This of course needs to be
#define INITIAL_JIFFIES 0
for correct uptime display

-
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/