From: Ralf Baechle <ralf@linux-mips.org>
To: Manuel Lauss <manuel.lauss@googlemail.com>
Cc: Linux-MIPS <linux-mips@linux-mips.org>,
Manuel Lauss <manuel.lauss@gmail.com>
Subject: Re: [PATCH] Alchemy: override loops_per_jiffy detection
Date: Thu, 27 Aug 2009 11:57:58 +0100 [thread overview]
Message-ID: <20090827105758.GA29561@linux-mips.org> (raw)
In-Reply-To: <1250957352-14359-1-git-send-email-manuel.lauss@gmail.com>
On Sat, Aug 22, 2009 at 06:09:12PM +0200, Manuel Lauss wrote:
> The loops_per_jiffy detection in generic calibrate_delay is a bit off
> (by ~0.5% usually); calculate the correct value based on detected core
> clock. BogoMIPS value will now reflect cpu core clock correctly.
It think this is pretty much solving a non-problem. The BogoMIPS number
should only be used for various delay functions and the only give a
guarantee for a minimum delay but barely any promise about accuracy of
the delay. Due to interrupts consuming some CPU time and potencially
producing extra cache misses the measured BogoMIPS value is expected to
be a bit lower than what a naive calculation based on the CPU clock is
predicting; effects that not only impact the calculation of the BogoMIPS
number but also delays based on the BogoMIPS number.
Here's an even easier solution:
#include <linux/jiffies.h>
...
preset_lpj = <loops_per_jiffie_value>;
Avoid the change to Kconfig that eventually will become messy if other
systems continue along this line.
Ralf
next prev parent reply other threads:[~2009-08-27 10:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-22 16:09 [PATCH] Alchemy: override loops_per_jiffy detection Manuel Lauss
2009-08-27 10:57 ` Ralf Baechle [this message]
2009-08-27 12:08 ` Manuel Lauss
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=20090827105758.GA29561@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=linux-mips@linux-mips.org \
--cc=manuel.lauss@gmail.com \
--cc=manuel.lauss@googlemail.com \
/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;
as well as URLs for NNTP newsgroup(s).