Pinned topic Why powerpc doesn't support BogoMIPS ?
Why doesn't powerpc support BogoMIPS in Linux Kernel?
BogoMIPS function is not in Linux Kernel source for powerpc.
And there isn't even any option like CONFIG_GENERIC_CALIBRATE_DELAY which enables BogoMIPS to work.
If I force to enable the CONFIG_GENERIC_CALIBRATE_DELAY option in powerpc, would that work properly?
or, how can I measure MIPS on powerpc?
jscheel 0600025BWM67 Posts
Re: Why powerpc doesn't support BogoMIPS ?2011-10-28T09:59:07ZThis is the accepted answer. This is the accepted answer.Thanks for asking this question. My historical recollection is that the bogomips number became such a large number it was almost irrelevant in the Power Linux kernel. Or perhaps, it was something which did not map well to Power virtualization where we can share the same physical processor among multiple partitions. If I recall correctly, we supported it for a few years and then deprecated it. Let's see if one of our kernel guys recall the history and rationale for the decision.While we wait for their insight, I do have to ask: What are you trying to do with bogomips? My recollection was that at one point it was used for timing and/or determining processor speeds. If these are your desires, we can give you more correct ways of finding the information for which you are looking.Updated on 2011-10-28T09:59:07Z at 2011-10-28T09:59:07Z by jscheel
PaulMackerras 110000MB1F1 Post
Re: Why powerpc doesn't support BogoMIPS ?2011-10-28T10:04:45ZThis is the accepted answer. This is the accepted answer.It comes down to how the function in Linux to delay for a short length of time is implemented.On x86 and many other architectures, it is just a simple loop that decrements a counter until it is zero. In order to use this to delay for a certain number of microseconds, the loop has to be calibrated first so the kernel knows how many iterations the cpu can do in one microsecond. That number, multiplied by 2, is reported as the BogoMIPS. (The 2 is because it assumes that the loop has two instructions; a decrement and a branch.)On powerpc, we have a "timebase" register that increments at a fixed, known rate. We use this in the delay function. So, to delay for N microseconds, if the timebase runs at R Mhz, we read the timebase and then spin until the timebase gets to a value N * R counts larger. This gives a reliable, stable method of delaying for N microseconds. It is better than just decrementing a register until it gets to zero because it is not affected by changes in the CPU clock frequency or activity of other CPUs -- in particular with SMT (hyperthreading), activity of other threads in the same core can greatly affect how fast a decrementing loop will run.The side effect of this is that the reported BogoMIPS is (approximately) twice the timebase frequency in MHz and is completely unrelated to how fast the processor executes instructions. BogoMIPS was never a very meaningful measure of processor speed anyway, so the fact that it is bogus on PowerPC just emphasizes the "Bogo" part of the name. :)If you want to know how fast a given PowerPC processor can execute instructions, you need to look at whatever benchmarks are relevant to the workload you want to run.
Re: Why powerpc doesn't support BogoMIPS ?2011-10-30T14:19:32ZThis is the accepted answer. This is the accepted answer.
- jscheel 0600025BWM
Thanks for your answer.
I need to show users the processor speeds(how fast the processor executes instructions) when they want.
If you can give me more correct ways of finding the information instead of BogoMIPS,
I would really really appreciate it.
Re: Why powerpc doesn't support BogoMIPS ?2011-11-02T17:47:08ZThis is the accepted answer. This is the accepted answer.
- PaulMackerras 110000MB1F
Thanks for the details.
I found a variable tb_ticks_per_jiffy in arch/powerpc/kernel/time.c
It looks like a timebase-based loops_per_jiffy.
Is it reliable?
It should be measured "at boot time"?Updated on 2011-11-02T17:47:08Z at 2011-11-02T17:47:08Z by corone