3.15.4 runs *significantly* slower than 3.15.3 on iMX233 CPU
Subsystems (2)
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
Quoted 15 lines · Manuel Reimer
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(quoted diff) +1
-1-AUDIT -SELINUX -IMA -SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ +SECCOMP -APPARMOR)
Quoted 4 lines
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
Quoted 2 lines · Guenter Roeck
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:
arch/arm/boot/dts/imx23-olinuxino.dts +7 -0
@@ -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
Quoted 17 lines · Manuel Reimer
Quoted 2 lines · Guenter Roeck
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:
arch/arm/boot/dts/imx23-olinuxino.dts +0
-0
arch/arm/boot/dts/imx23-olinuxino.dts line 67
Quoted 4 lines
arch/arm/boot/dts/imx23-olinuxino.dts +1
-0@@ -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
Quoted 17 lines · Guenter Roeck
arch/arm/boot/dts/imx23-olinuxino.dts line 67
Quoted 13 lines
I tracked the problem down to the following patch:
arch/arm/boot/dts/imx23-olinuxino.dts +1
-0@@ -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.
Quoted 2 lines
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
Quoted 25 lines · Manuel Reimer
Quoted 19 lines · Guenter Roeck
Quoted 10 lines
I tracked the problem down to the following patch:
arch/arm/boot/dts/imx23-olinuxino.dts +0
-0arch/arm/boot/dts/imx23-olinuxino.dts line 67
Quoted 4 lines
arch/arm/boot/dts/imx23-olinuxino.dts +1
-0@@ -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.
Quoted 3 lines
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.
Quoted 5 lines
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 -- [email protected]
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