* Query about loops_per_jiffy
@ 2010-01-19 13:38 胡杨树
2010-01-22 1:11 ` 答复: " rocky
0 siblings, 1 reply; 5+ messages in thread
From: 胡杨树 @ 2010-01-19 13:38 UTC (permalink / raw)
To: linux-arm-kernel
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>
^ permalink raw reply [flat|nested] 5+ messages in thread
* 答复: Query about loops_per_jiffy
2010-01-19 13:38 Query about loops_per_jiffy 胡杨树
@ 2010-01-22 1:11 ` rocky
0 siblings, 0 replies; 5+ messages in thread
From: rocky @ 2010-01-22 1:11 UTC (permalink / raw)
To: linux-arm-kernel
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>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Query about loops_per_jiffy
@ 2010-01-19 7:42 胡杨树
2010-01-19 8:21 ` Alessandro Rubini
2010-01-19 8:22 ` Russell King - ARM Linux
0 siblings, 2 replies; 5+ messages in thread
From: 胡杨树 @ 2010-01-19 7:42 UTC (permalink / raw)
To: linux-arm-kernel
Hi, oldhands:)
I have a question about how loops_per_jiffy converted to BogoMips,
loops_per_jiffy * HZ <----------- that's number of instructions CPU executes in a second
BogoMips <-------------------------- Millions of instructions CPU executes in a second
so , do the math!
(loops_per_jiffy * HZ)/1000,000 will give a BogoMips value.
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);
Am I missing something ?
Great thanks for any tips!
^ permalink raw reply [flat|nested] 5+ messages in thread* Query about loops_per_jiffy
2010-01-19 7:42 胡杨树
@ 2010-01-19 8:21 ` Alessandro Rubini
2010-01-19 8:22 ` Russell King - ARM Linux
1 sibling, 0 replies; 5+ messages in thread
From: Alessandro Rubini @ 2010-01-19 8:21 UTC (permalink / raw)
To: linux-arm-kernel
> (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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Query about loops_per_jiffy
2010-01-19 7:42 胡杨树
2010-01-19 8:21 ` Alessandro Rubini
@ 2010-01-19 8:22 ` Russell King - ARM Linux
1 sibling, 0 replies; 5+ messages in thread
From: Russell King - ARM Linux @ 2010-01-19 8:22 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jan 19, 2010 at 03:42:53PM +0800, ??? wrote:
> Hi, oldhands:)
>
> I have a question about how loops_per_jiffy converted to BogoMips,
>
> loops_per_jiffy * HZ <----------- that's number of instructions CPU executes in a second
> BogoMips <-------------------------- Millions of instructions CPU executes in a second
No. The clue is in "Bogo" part of the name.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-01-22 1:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-19 13:38 Query about loops_per_jiffy 胡杨树
2010-01-22 1:11 ` 答复: " 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
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).