3.18 RT freezes on Raspberry Pi 2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Recently, Raspberry Pi Foundation presented and started selling new Raspberry Pi 2 SBC. It’s based on BCM2709 processor, which is an upgraded version of BCM2708. The main difference is that old BCM2708 has one core and its architecture is ARMv6, while the new BCM2709 has 4 cores and ARMv7 architecture. Most of the peripheral blocks are the same - DMA, I2C, UART, etc. 

RT patch has been working very well (after fixing the sd driver a couple of years ago) with Raspberry Pi 1 and kernel 3.12. 
With the release of the new board Raspberry Pi Foundation also switched to the new kernel version - 3.18, support for Raspberry Pi 2 has been introduced in that version.
I applied patch-3.18.7-rt2 on RPi’s kernel fork and built two kernels - one for Raspberry Pi 1 and another one for Raspberry Pi 2.
On older Raspberry Pi 1 3.18.7-rt2 seems to work without any problems, I ran cyclictest and stress and it performed well. 
But on new Raspberry Pi 2 I’m experiencing frequent freezes. 

Steps to reproduce: 
1. Clone https://github.com/raspberrypi/linux , checkout 3.18.7 - 0be82f722c097340632a59b879fbfee9c6148f53
2. Apply patch-3.18.7-rt2
3. (optionally) apply “[RT PATCH] mmc: sdhci: don't provide hard irq handler”
4. Make menuconfig bcm2709_defconfig
5 Configure: full rt preemption, periodic ticks, performance governor as default and optionally preemption debugging
6. Compile kernel & modules
7. Copy Image to /boot/kernel7.img and arch/arm/boot/dts/bcm2709-rpi-2-b.dtb to /boot/bcm2709-rpi-2-b.dtb, copy modules.
Boot and run: sudo cyclictest --smp -p51 -m

The bad thing is that it freezes without any message, even with preemption debug information and lockup detection enabled.

Here’s how it happens:
1. I connect to Raspberry Pi 2 over serial
2. I connect to Raspberry Pi 2 over Ethernet or WiFi
3. In the ssh terminal I run “sudo cyclictest --smp -p51 -m”, it works for 30 seconds and the terminal hangs. LEDs on WiFi or Ethernet connection stop blinking.
4. Serial terminal is still working, but after running a couple of commands it also freezes. If I try to run cyclictest on serial in that case it mostly freezes immediately, but a couple of times it ran and displayed that a couple of kernel are unavailable and after some time also froze.

If I run cyclictest on serial connection it also freezes regardless if WiFi or Ethernet are connected.

If I run “sudo cyclictest --smp -p49 -m” it does not freeze. So seems like it’s only affected when you run something with priority equal or higher than the priority of peripheral interrupt handlers.

Even though affinity mask for peripheral interrupts shows “f” it seems that they all run on cpu0 by checking /proc/interrupts. I tried adding “isolcpus=0” to /boot/cmdline.txt and with it the kernel does not freeze on “sudo cyclictest --smp -p51 -m” anymore. But it still freezes occasionally while working, it just takes much longer now to catch the freeze (30-60 minutes).

I’m trying to understand what causes such behaviour, as most of the drivers for Raspberry Pi 1 and 2 are the same. I’ve ruled out mmc by completely disabling it in the kernel and running from USB flash. 

Any ideas what can be done to understand what is causing this?
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux