linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: 914059751@qq.com (胡杨树)
To: linux-arm-kernel@lists.infradead.org
Subject: Query about loops_per_jiffy
Date: Tue, 19 Jan 2010 21:38:26 +0800	[thread overview]
Message-ID: <tencent_2543180B1828B0D317DCD9FC@qq.com> (raw)

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/20100119/1790ee2f/attachment.htm>

             reply	other threads:[~2010-01-19 13:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-19 13:38 胡杨树 [this message]
2010-01-22  1:11 ` 答复: Query about loops_per_jiffy rocky
  -- strict thread matches above, loose matches on Subject: below --
2010-01-19  7:42 胡杨树
2010-01-19  8:21 ` Alessandro Rubini
2010-01-19  8:22 ` Russell King - ARM Linux

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=tencent_2543180B1828B0D317DCD9FC@qq.com \
    --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;
as well as URLs for NNTP newsgroup(s).