All of lore.kernel.org
 help / color / mirror / Atom feed
From: rubini-list@gnudd.com (Alessandro Rubini)
To: linux-arm-kernel@lists.infradead.org
Subject: Query about loops_per_jiffy
Date: Tue, 19 Jan 2010 09:21:19 +0100	[thread overview]
Message-ID: <20100119082119.GA20977@morgana.gnudd.com> (raw)
In-Reply-To: <tencent_5CA6CD330328846756327199@qq.com>

> (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

  reply	other threads:[~2010-01-19  8:21 UTC|newest]

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

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=20100119082119.GA20977@morgana.gnudd.com \
    --to=rubini-list@gnudd.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.