linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 3.15.4 runs *significantly* slower than 3.15.3 on iMX233 CPU
@ 2014-07-07 18:21 Manuel Reimer
  2014-07-07 19:14 ` Guenter Roeck
  0 siblings, 1 reply; 6+ messages in thread
From: Manuel Reimer @ 2014-07-07 18:21 UTC (permalink / raw)
  To: linux-kernel

Hello,

maybe someone can help me to find the reason for this problem:

If I run my iMX233 development board with an 3.15.3 kernel, then the 
performance is much better as with an 3.15.4 kernel.

I have the first significant "hanging" here:

[    7.910000] sd 0:0:0:0: [sda] Attached SCSI removable disk
[   10.810000] random: nonblocking pool is initialized
[   24.310000] systemd[1]: systemd 214 running in system mode. (+PAM 
-AUDIT -SELINUX -IMA -SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ +SECCOMP 
-APPARMOR)

After booting up it takes several seconds between entering the username 
and the password while with version 3.15.3 the password prompt appears 
almost immediately after entering the username.

Please tell me if some additional information is needed.

Thank you very much in advance.

Greetings,

Manuel


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

* Re: 3.15.4 runs *significantly* slower than 3.15.3 on iMX233 CPU
  2014-07-07 18:21 3.15.4 runs *significantly* slower than 3.15.3 on iMX233 CPU Manuel Reimer
@ 2014-07-07 19:14 ` Guenter Roeck
  2014-07-07 19:29   ` Manuel Reimer
  0 siblings, 1 reply; 6+ messages in thread
From: Guenter Roeck @ 2014-07-07 19:14 UTC (permalink / raw)
  To: Manuel Reimer; +Cc: linux-kernel

On Mon, Jul 07, 2014 at 08:21:38PM +0200, Manuel Reimer wrote:
> Hello,
> 
> maybe someone can help me to find the reason for this problem:
> 
> If I run my iMX233 development board with an 3.15.3 kernel, then the
> performance is much better as with an 3.15.4 kernel.
> 
> I have the first significant "hanging" here:
> 
> [    7.910000] sd 0:0:0:0: [sda] Attached SCSI removable disk
> [   10.810000] random: nonblocking pool is initialized
> [   24.310000] systemd[1]: systemd 214 running in system mode. (+PAM
> -AUDIT -SELINUX -IMA -SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ
> +SECCOMP -APPARMOR)
> 
> After booting up it takes several seconds between entering the
> username and the password while with version 3.15.3 the password
> prompt appears almost immediately after entering the username.
> 

Are you sure this did not just happen when you booted the new kernel
for the first time ? I have seen similar behavior with some distributions.

If it happens all the time, ie at subsequent boots as wel, you'll probably
have to bisect the problem. I have not seen an obvious culprit.

Guenter

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

* Re: 3.15.4 runs *significantly* slower than 3.15.3 on iMX233 CPU
  2014-07-07 19:14 ` Guenter Roeck
@ 2014-07-07 19:29   ` Manuel Reimer
  2014-07-07 19:42     ` Guenter Roeck
  0 siblings, 1 reply; 6+ messages in thread
From: Manuel Reimer @ 2014-07-07 19:29 UTC (permalink / raw)
  To: linux-kernel

On 07/07/2014 09:14 PM, Guenter Roeck wrote:
> Are you sure this did not just happen when you booted the new kernel
> for the first time ? I have seen similar behavior with some distributions.

I did some more tries and found out that I had disabled some of my 
patches until I reached 3.15.4 (latest version) where I decided to do 
needed modifications to get my patches back in.

I tracked the problem down to the following patch:


diff --git a/arch/arm/boot/dts/imx23-olinuxino.dts 
b/arch/arm/boot/dts/imx23-olinuxino.dts
index d107c4a..993da2e 100644
--- a/arch/arm/boot/dts/imx23-olinuxino.dts
+++ b/arch/arm/boot/dts/imx23-olinuxino.dts
@@ -64,7 +64,14 @@
  				compatible = "fsl,imx23-spi";
  				pinctrl-names = "default";
  				pinctrl-0 = <&spi2_pins_a>;
+				clock-frequency = <1000000>;
  				status = "okay";
+
+				spidev0: spidev@0 {
+					compatible = "spidev";
+					spi-max-frequency = <1000000>;
+					reg = <0>;
+				};
  			};
  		};


I need this to add spidev support. But I don't understand why this 
change kills performance? Maybe the "high" value in "clock-frequency"? 
Can someone give me some information on how to fix this?

Thank you very much in advance.

Greetings,

Manuel


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

* Re: 3.15.4 runs *significantly* slower than 3.15.3 on iMX233 CPU
  2014-07-07 19:29   ` Manuel Reimer
@ 2014-07-07 19:42     ` Guenter Roeck
  2014-07-07 19:55       ` Manuel Reimer
  0 siblings, 1 reply; 6+ messages in thread
From: Guenter Roeck @ 2014-07-07 19:42 UTC (permalink / raw)
  To: Manuel Reimer; +Cc: linux-kernel

On Mon, Jul 07, 2014 at 09:29:21PM +0200, Manuel Reimer wrote:
> On 07/07/2014 09:14 PM, Guenter Roeck wrote:
> >Are you sure this did not just happen when you booted the new kernel
> >for the first time ? I have seen similar behavior with some distributions.
> 
> I did some more tries and found out that I had disabled some of my
> patches until I reached 3.15.4 (latest version) where I decided to
> do needed modifications to get my patches back in.
> 
> I tracked the problem down to the following patch:
> 
> 
> diff --git a/arch/arm/boot/dts/imx23-olinuxino.dts
> b/arch/arm/boot/dts/imx23-olinuxino.dts
> index d107c4a..993da2e 100644
> --- a/arch/arm/boot/dts/imx23-olinuxino.dts
> +++ b/arch/arm/boot/dts/imx23-olinuxino.dts
> @@ -64,7 +64,14 @@
>  				compatible = "fsl,imx23-spi";
>  				pinctrl-names = "default";
>  				pinctrl-0 = <&spi2_pins_a>;
> +				clock-frequency = <1000000>;

If I understand the code correctly, that means you reduce the access speed
for SPI flashes from 160 MHz down to 1 MHz.

If so, and if your system loads anything from a SPI flash, I would not be too
surprised that your system is now a bit on the slow side.

Guenter

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

* Re: 3.15.4 runs *significantly* slower than 3.15.3 on iMX233 CPU
  2014-07-07 19:42     ` Guenter Roeck
@ 2014-07-07 19:55       ` Manuel Reimer
  2014-07-07 20:37         ` Geert Uytterhoeven
  0 siblings, 1 reply; 6+ messages in thread
From: Manuel Reimer @ 2014-07-07 19:55 UTC (permalink / raw)
  To: linux-kernel

On 07/07/2014 09:42 PM, Guenter Roeck wrote:
>> I tracked the problem down to the following patch:
>>
>>
>> diff --git a/arch/arm/boot/dts/imx23-olinuxino.dts
>> b/arch/arm/boot/dts/imx23-olinuxino.dts
>> index d107c4a..993da2e 100644
>> --- a/arch/arm/boot/dts/imx23-olinuxino.dts
>> +++ b/arch/arm/boot/dts/imx23-olinuxino.dts
>> @@ -64,7 +64,14 @@
>>   				compatible = "fsl,imx23-spi";
>>   				pinctrl-names = "default";
>>   				pinctrl-0 = <&spi2_pins_a>;
>> +				clock-frequency = <1000000>;
>
> If I understand the code correctly, that means you reduce the access speed
> for SPI flashes from 160 MHz down to 1 MHz.
>
> If so, and if your system loads anything from a SPI flash, I would not be too
> surprised that your system is now a bit on the slow side.

The iMX233 has two separate SPI connections. The first one is used to 
connect to the SD card where the system boots from and the second one is 
the one I plan to use. The idea was to only set clock frequency for the 
SPI bus, I want to use to connect to external devices. The "SD SPI" has 
to run with "full speed". So where is the mistake...

Thanks in advance.

Greetings,

Manuel


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

* Re: 3.15.4 runs *significantly* slower than 3.15.3 on iMX233 CPU
  2014-07-07 19:55       ` Manuel Reimer
@ 2014-07-07 20:37         ` Geert Uytterhoeven
  0 siblings, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2014-07-07 20:37 UTC (permalink / raw)
  To: Manuel Reimer; +Cc: linux-kernel

On Mon, Jul 7, 2014 at 9:55 PM, Manuel Reimer
<Manuel.Spam@nurfuerspam.de> wrote:
> On 07/07/2014 09:42 PM, Guenter Roeck wrote:
>>>
>>> I tracked the problem down to the following patch:
>>>
>>>
>>> diff --git a/arch/arm/boot/dts/imx23-olinuxino.dts
>>> b/arch/arm/boot/dts/imx23-olinuxino.dts
>>> index d107c4a..993da2e 100644
>>> --- a/arch/arm/boot/dts/imx23-olinuxino.dts
>>> +++ b/arch/arm/boot/dts/imx23-olinuxino.dts
>>> @@ -64,7 +64,14 @@
>>>                                 compatible = "fsl,imx23-spi";
>>>                                 pinctrl-names = "default";
>>>                                 pinctrl-0 = <&spi2_pins_a>;
>>> +                               clock-frequency = <1000000>;
>>
>>
>> If I understand the code correctly, that means you reduce the access speed
>> for SPI flashes from 160 MHz down to 1 MHz.
>>
>> If so, and if your system loads anything from a SPI flash, I would not be
>> too
>> surprised that your system is now a bit on the slow side.
>
>
> The iMX233 has two separate SPI connections. The first one is used to
> connect to the SD card where the system boots from and the second one is the
> one I plan to use. The idea was to only set clock frequency for the SPI bus,
> I want to use to connect to external devices. The "SD SPI" has to run with
> "full speed". So where is the mistake...

drivers/spi/spi-mxs.c:mxs_spi_probe()

        ret = of_property_read_u32(np, "clock-frequency",
                                   &clk_freq);
        if (ret)
                clk_freq = clk_freq_default;

        ...

        ret = clk_prepare_enable(ssp->clk);

Any chance the clocks are shared, so this changes the rate for the
shared clock, affecting both SPI connections?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

end of thread, other threads:[~2014-07-07 20:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-07 18:21 3.15.4 runs *significantly* slower than 3.15.3 on iMX233 CPU Manuel Reimer
2014-07-07 19:14 ` Guenter Roeck
2014-07-07 19:29   ` Manuel Reimer
2014-07-07 19:42     ` Guenter Roeck
2014-07-07 19:55       ` Manuel Reimer
2014-07-07 20:37         ` Geert Uytterhoeven

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).