Re: time_second vs. time_uptime
From: Jung-uk Kim (jkim_at_FreeBSD.org)
Date: 09/10/05
- Previous message: Brooks Davis: "Re: time_second vs. time_uptime"
- In reply to: Brooks Davis: "Re: time_second vs. time_uptime"
- Next in thread: Poul-Henning Kamp: "Re: time_second vs. time_uptime"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: Brooks Davis <brooks@one-eyed-alien.net> Date: Fri, 9 Sep 2005 18:35:50 -0400
On Friday 09 September 2005 05:48 pm, Brooks Davis wrote:
> On Fri, Sep 09, 2005 at 05:44:24PM -0400, Jung-uk Kim wrote:
> > If I read the source correctly, time_second can go backwards or
> > forwards when there is a leap second but time_uptime cannot. Am
> > I right? If my assumption is right, it seems we have some
> > misuses in kernel, e. g., sched_sync() in sys/kern/vfs_subr.c.
> > It may not be critical but it worries me a little because a leap
> > second is scheduled to occur at the end of this year. ;-)
>
> Yes, uptime increases monotonically, but leap seconds and
> adjustments such as those made by ntpdate will make simple time
> values jump around. This bit me when I first did the interface
> epochs since absolute times are not necessarily unique.
It seems the most commonly misused places are networks stacks. It's
understandable because time_uptime is relatively new. :-)
http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/kern/kern_tc.c.diff?r1=1.140&r2=1.141
Anyway let's start fixing!
Thanks,
Jung-uk Kim
_______________________________________________
freebsd-arch@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
- text/x-diff attachment: sched_sync.diff
- Previous message: Brooks Davis: "Re: time_second vs. time_uptime"
- In reply to: Brooks Davis: "Re: time_second vs. time_uptime"
- Next in thread: Poul-Henning Kamp: "Re: time_second vs. time_uptime"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]