From: george anzinger <george@mvista.com>
To: Bill Davidsen <davidsen@tmr.com>
Cc: Ben Greear <greearb@candelatech.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: jiffies rollover, uptime etc.
Date: Tue, 19 Feb 2002 12:55:22 -0800 [thread overview]
Message-ID: <3C72BBBA.FB79F6D0@mvista.com> (raw)
In-Reply-To: <Pine.LNX.3.96.1020218191149.14047A-100000@gatekeeper.tmr.com>
Bill Davidsen wrote:
>
> On Mon, 18 Feb 2002, Ben Greear wrote:
>
> > I wonder, is it more expensive to write all drivers to handle the
> > wraps than to take the long long increment hit? The increment is
> > once every 10 miliseconds, right? That is not too often, all things
> > considered...
>
> If you are willing to code in assembler instead of C you can do better,
> at least on x86. You just need to do a 32 bit increment on the LS word,
> and if you get a carry you can incr the MS word.
>
> > Maybe the non-atomicity of the long long increment is the problem?
>
> I doubt it, the problem is that the software which expects jiffies is
> not all going to work well 64 bit. I think that's more the issue, and why
> Alan et al are fixing it piecemeal, I don't think there's some magic fix
> they're missing.
>
> > Does this problem still exist on 64-bit machines?
>
> Absolutely. But not as often ;-)
Actually you will have a VERY hard time getting it to roll over. Issues
of your life time, not to mention the hardware's life time. 64 bits
makes a VERY large number and you are counting in 427 day increments.
Remember we have been counting seconds since 1970 in 32 bits and
rollover is still, most likely, beyond the capability of any machine
running today to get to. Now consider counting in 427 day increments
instead of seconds.
>
> --
> bill davidsen <davidsen@tmr.com>
> CTO, TMR Associates, Inc
> Doing interesting things with little computers since 1979.
>
> -
> 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/
--
George george@mvista.com
High-res-timers: http://sourceforge.net/projects/high-res-timers/
Real time sched: http://sourceforge.net/projects/rtsched/
next prev parent reply other threads:[~2002-02-19 20:56 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-18 21:42 jiffies rollover, uptime etc Oliver Hillmann
2002-02-18 22:10 ` Alan Cox
2002-02-18 22:03 ` Oliver Hillmann
2002-02-18 22:19 ` Ben Greear
2002-02-18 22:32 ` Tim Schmielau
2002-02-18 22:43 ` Alan Cox
2002-02-18 23:26 ` bert hubert
2002-02-18 23:56 ` J Sloan
2002-02-18 23:57 ` Alan Cox
2002-02-19 0:58 ` Stephen Frost
2002-02-19 4:47 ` Paul Jakma
2002-02-19 0:17 ` Bill Davidsen
2002-02-19 20:55 ` george anzinger [this message]
2002-02-20 11:36 ` Ville Herva
2002-02-20 17:20 ` Mike Fedyk
2002-02-20 17:24 ` Rik van Riel
2002-02-20 17:32 ` Mike Fedyk
2002-02-20 17:39 ` Rik van Riel
2002-02-20 17:44 ` Mike Fedyk
2002-02-20 17:56 ` Derek Gladding
2002-02-21 13:19 ` Bill Davidsen
2002-02-20 19:08 ` David Mosberger
2002-02-20 19:53 ` Robert Love
2002-02-20 15:46 ` Bill Davidsen
2002-02-20 16:50 ` george anzinger
2002-02-18 22:12 ` Tim Schmielau
2002-02-18 23:22 ` J Sloan
-- strict thread matches above, loose matches on Subject: below --
2002-02-19 2:54 Chris Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3C72BBBA.FB79F6D0@mvista.com \
--to=george@mvista.com \
--cc=davidsen@tmr.com \
--cc=greearb@candelatech.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox