From: Andreas Mohr <andi@rhlx01.fht-esslingen.de>
To: ray-gmail@madrabbit.org
Cc: lkml <linux-kernel@vger.kernel.org>,
john stultz <johnstul@us.ibm.com>,
Dominik Brodowski <linux@brodo.de>
Subject: Re: delay_tsc(): inefficient delay loop (2.6.16-mm1)
Date: Fri, 24 Mar 2006 18:41:51 +0100 [thread overview]
Message-ID: <20060324174151.GA20085@rhlx01.fht-esslingen.de> (raw)
In-Reply-To: <2c0942db0603240922u7bade58lcf2a6af2af8ec6ae@mail.gmail.com>
Hi,
On Fri, Mar 24, 2006 at 09:22:51AM -0800, Ray Lee wrote:
> On 3/24/06, Andreas Mohr <andi@rhlx01.fht-esslingen.de> wrote:
> > + loops += bclock;
> [...]
> > - } while ((now-bclock) < loops);
> > + } while (now < loops);
>
> Erm, aren't you introducing an overflow problem here?
>
> if loops is 2^32-1, bclock is 1, the old version would execute the
> proper number of times, the new one will blow out in one tick.
Doh. That's what happens if you get too excited about some new trick...
Back to the drawing board, methinks.
Andreas Mohr
--
No programming skills!? Why not help translate many Linux applications!
https://launchpad.ubuntu.com/rosetta
next prev parent reply other threads:[~2006-03-24 17:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-24 17:04 Andreas Mohr
2006-03-24 17:22 ` Ray Lee
2006-03-24 17:41 ` Andreas Mohr [this message]
2006-03-24 17:37 ` Edgar Toernig
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=20060324174151.GA20085@rhlx01.fht-esslingen.de \
--to=andi@rhlx01.fht-esslingen.de \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@brodo.de \
--cc=ray-gmail@madrabbit.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
all inboxes | Powered by JetHome®