Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: 914059751@qq.com (rocky)
To: linux-arm-kernel@lists.infradead.org
Subject: 答复: Query about loops_per_jiffy
Date: Fri, 22 Jan 2010 09:11:29 +0800	[thread overview]
Message-ID: <6134FC3AD99C4CA8A47F7E3D5E71C470@dufan> (raw)
In-Reply-To: <tencent_2543180B1828B0D317DCD9FC@qq.com>

Green hand apology for the unintended CC, I should make this query personal.

 

  _____  

???: linux-arm-kernel-bounces at lists.infradead.org
[mailto:linux-arm-kernel-bounces at lists.infradead.org] ?? ???
????: 2010?1?19? 21:38
???: Alessandro Rubini
??: linux-arm-kernel
??: Re: Query about loops_per_jiffy

 

Are you  Alessandro Rubini of LINUX DEVICE DRIVER?

------------------ Original ------------------

From:  "Alessandro Rubini"<rubini-list@gnudd.com>;

Date:  Tue, Jan 19, 2010 04:21 PM

To:  "914059751"<914059751@qq.com>; 

Cc:  "linux-arm-kernel"<linux-arm-kernel@lists.infradead.org>; 

Subject:  Re: Query about loops_per_jiffy

 

> (loops_per_jiffy * HZ)/1000,000   will give a BogoMips value.

No, it will give a BogoLips (loops per second). A loop is two instructions,
in ./arch/arm/lib/delay.S (function __delay) called by init/calibrate.c ..
To have bogomips you need to multiply by two.

> then why calibrate_delay do it like the following:
>     printk(KERN_CONT "%lu.%02lu BogoMIPS (lpj=%lu)\n",
>             loops_per_jiffy/(500000/HZ),
>             (loops_per_jiffy/(5000/HZ)) % 100, loops_per_jiffy);

It's correct, using normal integer aritmetics care.

/alessandro

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100122/fc3ec93b/attachment.htm>

      reply	other threads:[~2010-01-22  1:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-19 13:38 Query about loops_per_jiffy 胡杨树
2010-01-22  1:11 ` rocky [this message]

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=6134FC3AD99C4CA8A47F7E3D5E71C470@dufan \
    --to=914059751@qq.com \
    --cc=linux-arm-kernel@lists.infradead.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