On Mon, 16 Aug 2004, Andrew Morton wrote:
OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx> wrote:
Albert Cahalan <albert@xxxxxxxxxxxx> writes:
Even with the 2.6.7 kernel, I'm still getting reports of process
start times wandering. Here is an example:
"About 12 hours since reboot to 2.6.7 there was already a
difference of about 7 seconds between the real start time
and the start time reported by ps. Now, 24 hours since reboot
the difference is 10 seconds."
The calculation used is:
now - uptime + time_from_boot_to_process_start
Start-time and uptime is using different source. Looks like the
jiffies was added bogus lost counts.
quick hack. Does this change the behavior?
Where did this all end up? Complaints about wandering start times are
persistent, and it'd be nice to get some fix in place...
Thanks.
Seems my analysis of the problem wasn't perceived as such.
The problem is that in the above calculation
now - uptime + time_from_boot_to_process_start
"uptime" currently is an ntp-corrected precise time, while "time_from_boot_to_process_start" just is the free-running "jiffies"
value.
The problem is easily reproducible for me. It goes away if the change
that rebased /proc/uptime on posix monotonic time and my followup patch to fix the resulting rounding issues in jiffies64_to_clock_t() are backed out with the following patch.