8240 BogoMIPS
Hi Dan, I have successfully ported Linux to my customized 8240 board. Linux runs fine, but I found that the performance is not as good as my expectation.
BogoMIPS value of my board is currently 131.89.
My board is configured to run in 200MHz system clock.
Both I/D-cache are enabled. So, theoretical BogoMIPS should be around 400.
I saw that you had experience in Sandpoint-8240 board.
What was the BogoMIPS value in your case?
Thank you in advance.
-- Seungdong Lee
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 2 lines · Seungdong Lee
Hi Dan, I have successfully ported Linux to my customized 8240 board.
Cool! Good job. What version of software are you using? Did you make any changes or want your board part of the kernel tree?
Quoted 2 lines
Linux runs fine, but I found that the performance is not as good as my expectation.
Is this just based on the BogoMIPS number, or do you have some benchmarks for comparison?
Quoted 1 line
BogoMIPS value of my board is currently 131.89.
I have not booted my 8240 for a while, and I don't remember the number. I have another 8240 showing up soon, so I will be back on that before long and will pay attention to this. For some reason, I do remember that with caches disabled this number is _really_ small, like 13 or 18 or something.
I don't believe any absolute number here. I just use it for a quick reference when I am testing various cache combinations to indicate that I am booting the kernel I wish to be using.
If this doesn't seem correct, ensure the processor is really running at the clock rate you expect. Verify external clocks, PLLs and the like. Also, make sure the timers used to determine this value are properly programmed. One test I always perform is to run 'sleep 10' at the shell prompt, and time it with my watch. It should be really close to 10 seconds, 9 or 11 on my watch are not close :-).
Quoted 2 lines
Both I/D-cache are enabled. So, theoretical BogoMIPS should be around 400.
I wouldn't use BogoMIPS for any kind of benchmark. There have been plenty of discussions on mailing lists (including linuxppc lists) to indicate this abosolute number doesn't mean much. I have many PowerPC systems running Linux, from 8xx embedded though 7400/G4 systems. I certainly can't predict what this number "should" be.
Verify clocks and timers are working and run some real benchmarks.
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 9 lines · Dan Malek
Quoted 2 lines · Seungdong Lee
BogoMIPS value of my board is currently 131.89. My board is configured to run in 200MHz system clock.
I have not booted my 8240 for a while, and I don't remember the number. I have another 8240 showing up soon, so I will be back on that before long and will pay attention to this. For some reason, I do remember that with caches disabled this number is _really_ small, like 13 or 18 or something.
I'm not very familiar with 82x0 processors, but doesn't 8240 use a 603-core? When I worked with a 603ev running at 200 MHz I got something like 133 BogoMIPS, so then the above value would be correct.
Quoted 5 lines
I wouldn't use BogoMIPS for any kind of benchmark. There have been plenty of discussions on mailing lists (including linuxppc lists) to indicate this abosolute number doesn't mean much. I have many PowerPC systems running Linux, from 8xx embedded though 7400/G4 systems. I certainly can't predict what this number "should" be.
The BogoMIPS can be used for rough sanity-checks when comparing processors with identical cores and different clocks. For anything else it's completely useless. And excelent example is that a Pentium CPU gives a BogoMIPS value of about 1xclock, while a Pentium MMX CPU gives about 2xclock, even though their real-life performance is practicly the same.
//Marcus
--
-------------------------------+-----------------------------------
Marcus Sundberg | Phone: +46 707 452062 Embedded Systems Consultant | Email: [email protected] Cendio Systems AB | http://www.cendio.com
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 7 lines · Dan Malek
Quoted 2 lines · Seungdong Lee
Hi Dan, I have successfully ported Linux to my customized 8240 board.
Cool! Good job. What version of software are you using? Did you make any changes or want your board part of the kernel tree?
I used Sandpoint-8240 port from Hard Hat Linux as a starting point, and my board is not widely available one.
So, I don't think that it is valuable to make a kernel tree for my work.
Quoted 7 lines
Quoted 3 lines
Linux runs fine, but I found that the performance is not as good as my expectation.
Is this just based on the BogoMIPS number, or do you have some benchmarks for comparison?
I am saying about only BogoMIPS. I know that 8xx board shows 50 BogoMIPS when I/D-caches are enabled.
It is theoretically correct. BogoMIPS assumes that a loop consumes two instructions, which is true for 366(or higher) system.
The same logic is applied to the other platforms. Test loop for PowerPC uses only one instruction.
But, fortunately 8xx family consumes two clock cycles for branch instruction, so loops_per_sec is one half of CPU clock frequency.
BogoMIPS, that is 2*loops_per_sec, should be same to CPU freq. In case of 603 or 8240, branch instruction consumes only one CPU
clock. So, BogoMIPS is 2*loops_per_sec, or 2*(CPU freq). I checked this argument on PowerMAC(G4 and 7500).
G4 uses PowerPC 7400 and PowerMAC 7500 uses PowerPC 604. They shows double the value of CPU clock as BogoMIPS.
Quoted 9 lines
Quoted 2 lines
BogoMIPS value of my board is currently 131.89.
I have not booted my 8240 for a while, and I don't remember the number. I have another 8240 showing up soon, so I will be back on that before long and will pay attention to this. For some reason, I do remember that with caches disabled this number is _really_ small, like 13 or 18 or something.
That's correct, if caches are disabled, it's 12.9. Loop itself is not affected by D-cache because test loop doesn't have data load/store operation. But, jiffies increment depends on Dectrementer exception handling. This part makes D-cache has an impact on BogoMIPS.
Quoted 5 lines
I don't believe any absolute number here. I just use it for a quick reference when I am testing various cache combinations to indicate that I am booting the kernel I wish to be using.
I don't believe that, either. But, if CPU is running in low frequency, the performance will be low.
Quoted 8 lines
If this doesn't seem correct, ensure the processor is really running at the clock rate you expect. Verify external clocks, PLLs and the like. Also, make sure the timers used to determine this value are properly programmed. One test I always perform is to run 'sleep 10' at the shell prompt, and time it with my watch. It should be really close to 10 seconds, 9 or 11 on my watch are not close :-).
Clock tick is correct, unless my watch is not out of order. And reference clock and PLL configuration has been checked.
After booting, HID0 was checked and it's value matches what I configured.
Quoted 10 lines
Quoted 3 lines
Both I/D-cache are enabled. So, theoretical BogoMIPS should be around 400.
I wouldn't use BogoMIPS for any kind of benchmark. There have been plenty of discussions on mailing lists (including linuxppc lists) to indicate this abosolute number doesn't mean much. I have many PowerPC systems running Linux, from 8xx embedded though 7400/G4 systems. I certainly can't predict what this number "should" be.
I am sure that you could predict it if you looked into the logic of measurement. :)
I know that it is not a performance barometer but can be a check point.
Quoted 5 lines
Verify clocks and timers are working and run some real benchmarks.
-- Dan
Thank you for your interest.
-- Seungdong Lee
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 12 lines · Marcus Sundberg
Quoted 9 lines · Dan Malek
Quoted 2 lines · Seungdong Lee
BogoMIPS value of my board is currently 131.89. My board is configured to run in 200MHz system clock.
I have not booted my 8240 for a while, and I don't remember the number. I have another 8240 showing up soon, so I will be back on that before long and will pay attention to this. For some reason, I do remember that with caches disabled this number is _really_ small, like 13 or 18 or something.
Quoted 4 lines
I'm not very familiar with 82x0 processors, but doesn't 8240 use a 603-core? When I worked with a 603ev running at 200 MHz I got something like 133 BogoMIPS, so then the above value would be correct.
Good information.
But, why it is 133 BogoMIPS?
I still think that the correct value is 400.
Quoted 7 lines
Quoted 6 lines
I wouldn't use BogoMIPS for any kind of benchmark. There have been plenty of discussions on mailing lists (including linuxppc lists) to indicate this abosolute number doesn't mean much. I have many PowerPC systems running Linux, from 8xx embedded though 7400/G4 systems. I certainly can't predict what this number "should" be.
Quoted 7 lines
The BogoMIPS can be used for rough sanity-checks when comparing processors with identical cores and different clocks. For anything else it's completely useless. And excelent example is that a Pentium CPU gives a BogoMIPS value of about 1xclock, while a Pentium MMX CPU gives about 2xclock, even though their real-life performance is practicly the same.
Maybe it is because of the difference in superscalar architecture.
-- Seungdong Lee
Quoted 8 lines
//Marcus
--
-------------------------------+-----------------------------------Marcus Sundberg | Phone: +46 707 452062 Embedded Systems Consultant | Email: [email protected] Cendio Systems AB | http://www.cendio.com
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 8 lines · Seungdong Lee
Quoted 4 lines · Marcus Sundberg
I'm not very familiar with 82x0 processors, but doesn't 8240 use a 603-core? When I worked with a 603ev running at 200 MHz I got something like 133 BogoMIPS, so then the above value would be correct.
Good information.
But, why it is 133 BogoMIPS?
Because that's what a 200 MHz PowerPC 603 gives you. Checking the BogoMIPS howto will show you one report of a 603, running at 100 MHz and giving 66 BogoMIPS, which is at par with our results.
Quoted 1 line
I still think that the correct value is 400.
Unless you have tried other 603-based sytems you have no reason to think so. I repeat my statement from the previous post:
Quoted 3 lines
Quoted 3 lines
The BogoMIPS can be used for rough sanity-checks when comparing processors with identical cores and different clocks. For anything else it's completely useless.
//Marcus
--
-------------------------------+-----------------------------------
Marcus Sundberg | Phone: +46 707 452062 Embedded Systems Consultant | Email: [email protected] Cendio Systems AB | http://www.cendio.com
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 16 lines · Marcus Sundberg
Quoted 8 lines · Seungdong Lee
Quoted 4 lines · Marcus Sundberg
I'm not very familiar with 82x0 processors, but doesn't 8240 use a 603-core? When I worked with a 603ev running at 200 MHz I got something like 133 BogoMIPS, so then the above value would be correct.
Good information.
But, why it is 133 BogoMIPS?Because that's what a 200 MHz PowerPC 603 gives you. Checking the BogoMIPS howto will show you one report of a 603, running at 100 MHz and giving 66 BogoMIPS, which is at par with our results.
Quoted 5 lines
Quoted 1 line
I still think that the correct value is 400.
Unless you have tried other 603-based sytems you have no reason to think so. I repeat my statement from the previous post:
You are right, but you might think in other way if you read instruction timing section in 603 manual.
Branch instruction needs only 1 CPU clock and test loop is as follows.
extern __inline__ void __delay(unsigned int loops)
{
if (loops != 0)
__asm__ __volatile__("mtctr %0; 1: bdnz 1b" : :
"r" (loops) : "ctr");
}"bdnz" instruction is executed 'loops' times.
bdnz is the instruction which jumps to itself. Loop count is controlled by CTR register.
Please check the BogoMIPS algorithm.
It is still misterious to me.
Bye.
-- Seungdong Lee
Quoted 5 lines
Quoted 4 lines
Quoted 4 lines
The BogoMIPS can be used for rough sanity-checks when comparing processors with identical cores and different clocks. For anything else it's completely useless.
Quoted 7 lines
//Marcus
--
-------------------------------+-----------------------------------Marcus Sundberg | Phone: +46 707 452062 Embedded Systems Consultant | Email: [email protected] Cendio Systems AB | http://www.cendio.com
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 21 lines · Seungdong Lee
Quoted 8 lines · Marcus Sundberg
Quoted 6 lines · Seungdong Lee
Quoted 3 lines · Marcus Sundberg
I'm not very familiar with 82x0 processors, but doesn't 8240 use a 603-core? When I worked with a 603ev running at 200 MHz I got something like 133 BogoMIPS, so then the above value would be correct.
I still think that the correct value is 400.
You are right, but you might think in other way if you read instruction timing section in 603 manual.
Branch instruction needs only 1 CPU clock and test loop is as follows.extern
__inline__void__delay(unsigned int loops){ if (loops != 0) __asm__ __volatile__("mtctr %0; 1: bdnz 1b" : : "r" (loops) : "ctr"); }
Quoted 3 lines
"bdnz" instruction is executed 'loops' times.
bdnz is the instruction which jumps to itself.
Loop count is controlled by CTR register.
In this case you utilize the single dedicated loop HW resorce of the PowerPC architecture. I have at times had to resort to this kind of handassembling with addition of move-many instructions and cache nullify to eliminate copyback reading, simply because GCC _does not_ utilize this dedicated hardware on its own.
Quoted 1 line
Please check the BogoMIPS algorithm.
Rather check the implementation. If it is written in C then it will not result in the above assembly construct - it will use an ordinary register as loop counter instead.
--
******************************************************
Never ever underestimate the power of human stupidity. -Robert Anson Heinlein
[email protected]
******************************************************
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 33 lines · Geir Frode Raanes
Quoted 21 lines · Seungdong Lee
Quoted 8 lines · Marcus Sundberg
Quoted 6 lines · Seungdong Lee
Quoted 3 lines · Marcus Sundberg
I'm not very familiar with 82x0 processors, but doesn't 8240 use a 603-core? When I worked with a 603ev running at 200 MHz I got something like 133 BogoMIPS, so then the above value would be correct.
I still think that the correct value is 400.
You are right, but you might think in other way if you read instruction timing section in 603 manual.
Branch instruction needs only 1 CPU clock and test loop is as follows.extern
__inline__void__delay(unsigned int loops){ if (loops != 0) __asm__ __volatile__("mtctr %0; 1: bdnz 1b" : : "r" (loops) : "ctr"); }Quoted 3 lines
"bdnz" instruction is executed 'loops' times.
bdnz is the instruction which jumps to itself.
Loop count is controlled by CTR register.In this case you utilize the single dedicated loop HW resorce of the PowerPC architecture. I have at times had to resort to this kind of handassembling with addition of move-many instructions and cache nullify to eliminate copyback reading, simply because GCC
_doesnot_utilize this dedicated hardware on its own.
Quoted 6 lines
Quoted 1 line
Please check the BogoMIPS algorithm.
Rather check the implementation. If it is written in C then it will not result in the above assembly construct - it will use an ordinary register as loop counter instead.
Above inline assembly is not my own.
You can find it in official Linux/PowerPC distribution. I don't think that compiler changes anything in loop itself. Bye.
-- Seungdong Lee
Quoted 9 lines
--
******************************************************
Never ever underestimate the power of human stupidity. -Robert Anson Heinlein[email protected]
******************************************************
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 25 lines · Marcus Sundberg
Quoted 8 lines · Seungdong Lee
Quoted 4 lines · Marcus Sundberg
I'm not very familiar with 82x0 processors, but doesn't 8240 use a 603-core? When I worked with a 603ev running at 200 MHz I got something like 133 BogoMIPS, so then the above value would be correct.
Good information.
But, why it is 133 BogoMIPS?Because that's what a 200 MHz PowerPC 603 gives you. Checking the BogoMIPS howto will show you one report of a 603, running at 100 MHz and giving 66 BogoMIPS, which is at par with our results.
Quoted 1 line
I still think that the correct value is 400.
Unless you have tried other 603-based sytems you have no reason to think so. I repeat my statement from the previous post:
Quoted 3 lines
Quoted 3 lines
The BogoMIPS can be used for rough sanity-checks when comparing processors with identical cores and different clocks. For anything else it's completely useless.
Quoted 6 lines
//Marcus
--
-------------------------------+-----------------------------------Marcus Sundberg | Phone: +46 707 452062 Embedded Systems Consultant | Email: [email protected] Cendio Systems AB | http://www.cendio.com
Hi guys, I got a reply from Motorola about instruction timing of bdnz. Conclusion is that it needs 3 cycles in 603. E-mail from Motorola is attached.
-- Seungdong Lee
Quoted 71 lines · DigitalDNA Help
Dear Seungdong Lee,
in reply to your Service Request SR 1-UC2R (see details below):
Instruction flow is discribed in "MPC603e & EC603e RISC Microprocessors User's Manual" Chapter 6.3.
BDNZ command executes as follow : fetch, dispatch, execute, writeback. Last three steps are necessary to modify CTR. While first command doesn't complete execute phase, next BDNZ command can't be dispatched since they use CTR register both. So instruction takes up 3 cycles.
I should note that if your loop isn't the void one then BDNZ latency can occupy even 0 cycles. For example:
_L: add
subf
subf
bdnz _LWhile executing of subf, bdnz will be prefetched and executed, moreover due to static branch prediction add command will be speculatively executed without awaiting of branch being executed. BDNZ effective cycle time equals 0.
------- Details of your request: -------
Date Opened : 05/25/2000 00:10:46 Product : XPC8240LZU200C Category: Technical Request---------- Subject ----------
8240 or 603e instruction timing---------- Description ----------
mtctr r3
1: bdnz 1bIf r3 is 200*1000*1000,
how long does it take for MPC8240/200MHz CPU to execute bdnz loop? I think that it should take only 1 second. But, the result is 3 seconds. Can you explain my result?Manual says that branch instruction consumes only 1 CPU clock. Apparently it is not true in my case. I found that other 603 based board shows similar result. BogoMIPS value from Linux community can be the evidence. BogoMIPS is 2*(loops per second)/1000000.
Platform BogoMIPS Reported by PowerPC 603/100 66.56 A. Costa<[email protected]>
PowerPC 603/200 131.19 Marcus Sundberg <[email protected]>MPC8240/200 131.48 This is my result.
Expected value is 400 in my case.
Can I have any reasonable explanation about this?
Thanks.-- Seungdong Lee
------- End of request details -------To review or update this Service Request, or to enter a new Service Request, please access Motorola's Customer Support web site at
http://www.motorola.com/semiconductors/supportIf there is ever an occasion when you cannot access Motorola's Customer Support web site, you can also contact us by sending an email to [email protected]
or by calling us at one of the following numbers:
Quoted 7 lines
Americas 1-800-521-6274 7AM-6PM Phoenix Asia +852-2666-8307 8AM-6PM Hong Kong Japan 0120-191-014 8AM-5PM Tokyo Europe +49-89-92103-559 9AM-5PM MunichRegards,
Motorola Semiconductors Customer Support
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/