Re: [Bug 764] New: btime in /proc/stat wobbles (even over 30 seconds)

From: Kingsley Cheung (
Date: Wed Jun 11 2003 - 20:20:11 EST

On Mon, Jun 02, 2003 at 08:02:22AM -0700, Martin J. Bligh wrote:
> Summary: btime in /proc/stat wobbles (even over 30 seconds)
> Kernel Version: 2.5.70 but also in 2.2.20
> Status: NEW
> Severity: normal
> Owner:
> Submitter:
> Distribution: Debian and Red Hat
> Hardware Environment: i386
> Software Environment: /proc
> Problem Description:
> btime in /proc/stat changes over time. We even see it wobble over 30 seconds.
> See also
> Steps to reproduce:
> Comparing /proc/stat's btime every minute shows the differences.
> We see this behaviour on all of our 1500 Linux machines.

I see that there has been a fix made for this since 2.5.70-bk13 or
2.5.70-bk14 that solves this problem by using the seqlock to ensure
that the jiffies and time of day are atomically read.

However, wouldn't it be better to have the boottime calculated only
once so that it is independent of changes in the system time that may
occur later? Even with the fix with seqlock, the boottime can still
change back or forwards whenever the system time is set back or
forwards. IMHO an unchanging boottime that is independent of the time
of day is the best approach. Maybe something like the patch against
2.5.70-bk14 that I've attached.

What do people think?


- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to More majordomo info at Please read the FAQ at

This archive was generated by hypermail 2b29 : Sun Jun 15 2003 - 22:00:30 EST