From: Andreas Dilger <adilger@turbolabs.com>
To: george anzinger <george@mvista.com>
Cc: Tim Schmielau <tim@physik3.uni-rostock.de>, linux-kernel@vger.kernel.org
Subject: Re: [patch][rfc] enable uptime display > 497 days on 32 bit
Date: Tue, 26 Feb 2002 16:33:23 -0700 [thread overview]
Message-ID: <20020226163323.G12832@lynx.adilger.int> (raw)
In-Reply-To: <Pine.LNX.4.33.0202261754030.14645-100000@gans.physik3.uni-rostock.de> <3C7BE53E.BB789BC6@mvista.com> <20020226135006.R12832@lynx.adilger.int> <3C7C16AC.D08F8152@mvista.com>
In-Reply-To: <3C7C16AC.D08F8152@mvista.com>; from george@mvista.com on Tue, Feb 26, 2002 at 03:13:48PM -0800
On Feb 26, 2002 15:13 -0800, george anzinger wrote:
> Andreas Dilger wrote:
> > Do you think that doing a 64-bit add-with-carry to memory on each
> > timer interrupt and doing multiple volatile reads is faster than
> > doing a spinlock with an optional 32-bit increment?
>
> I think the memory cycle is "almost" free as we are also updating
> jiffies which is in the same cache line, so, yes, in the overall scheme
> of things the overhead of the additional add-with-carry is very small.
> On the read side of things, the issue is not so much the lock, but the
> irq nature of it. This will be VERY long, much longer than the double
> load of the high order bits, again from the same cache line.
I was wondering about that myself when looking at the code again. I'm
not quite sure why we need to use the irq spinlock, since we already
make a local copy of jiffies so another timer IRQ changing the jiffies
value shouldn't affect the return value of get_jiffies64(). Then again,
that isn't exactly stuff I'm familiar with, so I could be totally
off-base here.
Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/
next prev parent reply other threads:[~2002-02-26 23:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-26 17:45 Tim Schmielau
2002-02-26 17:57 ` Tim Schmielau
2002-02-26 19:42 ` george anzinger
2002-02-26 20:14 ` Tim Schmielau
2002-02-26 20:50 ` Andreas Dilger
2002-02-26 23:13 ` george anzinger
2002-02-26 23:33 ` Andreas Dilger [this message]
2002-02-27 4:34 ` Tim Schmielau
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=20020226163323.G12832@lynx.adilger.int \
--to=adilger@turbolabs.com \
--cc=george@mvista.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tim@physik3.uni-rostock.de \
/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
all inboxes | Powered by JetHome®