Generic Linux architectural discussions
 help / color / mirror / Atom feed
* Re: [PATCH 1/3] [ARM] Translate delay.S into (mostly) C
       [not found]             ` <alpine.LFD.2.00.1010061553350.3107@xanadu.home>
@ 2010-10-08  0:11               ` Stephen Boyd
  2010-10-08  1:12                 ` Nicolas Pitre
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Boyd @ 2010-10-08  0:11 UTC (permalink / raw)
  To: Nicolas Pitre
  Cc: Daniel Walker, Russell King, Kevin Hilman, linux-arm-msm,
	linux-kernel, Saravana Kannan, Santosh Shilimkar, Colin Cross,
	linux-arm-kernel, linux-arch

 On 10/06/2010 01:05 PM, Nicolas Pitre wrote:
> You could use the noinline qualifier from <linux/compiler.h> with those 
> functions you don't want inlined.
>

That won't help me for the interleaving behavior though.

>> Is it possible to do all this in assembly ? Can't you have the default
>> implementation using this assembly with different function names, then
>> just set the assembly function names in C code someplace?
> That weould be my preference too.  Being in assembly means that this 
> code is unlikely to change with different optimization levels and/or gcc 
> versions which would otherwise require different calibration values. 
> Relying on stable calibration is necessary for the lpj kernel cmdline 
> parameter to have some meaning.

Why doesn't any other architecture use assembly for their lpj code? They
may use headers with assembly in them or C code with assembly in them,
but they don't write all of the delay code in assembly and rely on
function interleaving. This leads me to believe other arches aren't
concerned about compiler optimizations breaking lpj cmdline parameters,
so why should ARM be concerned?

I tested the theory out and scaled down the CPU frequency to 19.2 MHz
and then called calibrate_delay(). Before and after applying this series
I got the same results.

Calibrating delay loop... 12.67 BogoMIPS (lpj=63360)

Jumping up to 1.2 GHz and calling calibrate_delay() gives me the same
before and after

Calibrating delay loop... 792.98 BogoMIPS (lpj=3964928)

I don't have access to a machine capable of running slower than 19.2
MHz. Maybe machines running in the KHz range would experience differences?

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/3] [ARM] Translate delay.S into (mostly) C
  2010-10-08  0:11               ` [PATCH 1/3] [ARM] Translate delay.S into (mostly) C Stephen Boyd
@ 2010-10-08  1:12                 ` Nicolas Pitre
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Pitre @ 2010-10-08  1:12 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Daniel Walker, Russell King, Kevin Hilman, linux-arm-msm,
	linux-kernel, Saravana Kannan, Santosh Shilimkar, Colin Cross,
	linux-arm-kernel, linux-arch

On Thu, 7 Oct 2010, Stephen Boyd wrote:

> Why doesn't any other architecture use assembly for their lpj code? They
> may use headers with assembly in them or C code with assembly in them,
> but they don't write all of the delay code in assembly and rely on
> function interleaving. This leads me to believe other arches aren't
> concerned about compiler optimizations breaking lpj cmdline parameters,
> so why should ARM be concerned?
> 
> I tested the theory out and scaled down the CPU frequency to 19.2 MHz
> and then called calibrate_delay(). Before and after applying this series
> I got the same results.
> 
> Calibrating delay loop... 12.67 BogoMIPS (lpj=63360)
> 
> Jumping up to 1.2 GHz and calling calibrate_delay() gives me the same
> before and after
> 
> Calibrating delay loop... 792.98 BogoMIPS (lpj=3964928)

OK, fair enough.

> I don't have access to a machine capable of running slower than 19.2
> MHz. Maybe machines running in the KHz range would experience differences?

Don't worry, I doubt any ARM processor capable of running Linux ever was 
that slow.


Nicolas

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-10-08  1:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1285644827-6846-1-git-send-email-sboyd@codeaurora.org>
     [not found] ` <1285644827-6846-2-git-send-email-sboyd@codeaurora.org>
     [not found]   ` <1286299355.18791.11.camel@c-dwalke-linux.qualcomm.com>
     [not found]     ` <4CABEECB.4030301@codeaurora.org>
     [not found]       ` <alpine.LFD.2.00.1010061024220.3107@xanadu.home>
     [not found]         ` <4CACC053.2090509@codeaurora.org>
     [not found]           ` <1286393743.22265.129.camel@m0nster>
     [not found]             ` <alpine.LFD.2.00.1010061553350.3107@xanadu.home>
2010-10-08  0:11               ` [PATCH 1/3] [ARM] Translate delay.S into (mostly) C Stephen Boyd
2010-10-08  1:12                 ` Nicolas Pitre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox