Public bug reported: SRU Justification: ==================
[Impact] On a Raspberry Pi 5 running a realtime kernel, RP1 IRQ threads do not follow smp_affinity. This means that IRQ threads will always remain running on the CPU they were initially scheduled on, and cannot be moved. This also means that IRQ threads can't be moved off of isolated CPUs, or onto isolated CPUs as desired, which may introduce significant variability in latencies for some workloads. The upstream bug link may also have relevant context: https://github.com/raspberrypi/linux/issues/7301 [Fix] Cherry-pick commits b6e5abe492944af09154b6ba65d8db5c4b87accb and 19dec222ead344334230f57732f994c77af6bb6f from upstream rpi-7.0.y. These commits were introduced in https://github.com/raspberrypi/linux/pull/7302. [Test Case] 1. Select an RP1 IRQ thread, and check the CPU it's running on ps -eo psr,comm | grep irq/108 1 irq/108-eth%d # IRQ 108 running on CPU 1 2. Compare the thread's smp_affinity and effective_affinity, and note that effective_affinity is not set cat /proc/irq/108/smp_affinity_list 0-3 cat /proc/irq/108/effective_affinity_list # The line above represents empty output from cat. We expect to also see 0-3 here on a fixed kernel. 3. Update the thread's smp_affinity to attempt to move it onto another CPU echo "3" > /proc/irq/108/smp_affinity_list cat /proc/irq/108/effective_affinity_list # Output of cat is once again empty. We expect to see 3 here on a fixed kernel. ps -eo psr,comm | grep irq/108 1 irq/108-eth%d # IRQ 108 is still running on CPU 1, but we expect CPU 3 here on a fixed kernel. [Regression Potential] The cherry-picked fixes from upstream should only impact the RP1 driver for the Raspberry Pi 5, and as far as I can tell there have been no reported issues upstream with these fixes so I believe the regression potential to be low. ** Affects: linux-raspi (Ubuntu) Importance: Medium Assignee: April Cardenas (apcaus) Status: In Progress ** Affects: linux-raspi (Ubuntu Resolute) Importance: Medium Assignee: April Cardenas (apcaus) Status: In Progress ** Affects: linux-raspi (Ubuntu Stonking) Importance: Undecided Status: Fix Released ** Changed in: linux-raspi (Ubuntu) Milestone: resolute-updates => None ** Description changed: SRU Justification: ================== [Impact] On a Raspberry Pi 5 running a realtime kernel, RP1 IRQ threads do not follow smp_affinity. This means that IRQ threads will always remain running on the CPU they were initially scheduled on, and cannot be moved. This also means that IRQ threads can't be moved off of isolated CPUs, or onto isolated CPUs as desired, which may introduce significant variability in latencies for some workloads. The upstream bug link may also have relevant context: https://github.com/raspberrypi/linux/issues/7301 [Fix] Cherry-pick commits b6e5abe492944af09154b6ba65d8db5c4b87accb and 19dec222ead344334230f57732f994c77af6bb6f from upstream rpi-7.0.y. These commits were introduced in https://github.com/raspberrypi/linux/pull/7302. [Test Case] 1. Select an RP1 IRQ thread, and check the CPU it's running on - ps -eo psr,comm | grep irq/108 - 1 irq/108-eth%d # IRQ 108 running on CPU 1 + ps -eo psr,comm | grep irq/108 + 1 irq/108-eth%d # IRQ 108 running on CPU 1 2. Compare the thread's smp_affinity and effective_affinity, and note that effective_affinity is not set - cat /proc/irq/108/smp_affinity_list - 0-3 + cat /proc/irq/108/smp_affinity_list + 0-3 - cat /proc/irq/108/effective_affinity_list + cat /proc/irq/108/effective_affinity_list # The line above represents empty output from cat. We expect to also see 0-3 here on a fixed kernel. 3. Update the thread's smp_affinity to attempt to move it onto another CPU - echo "3" > /proc/irq/108/smp_affinity_list - cat /proc/irq/108/effective_affinity_list + echo "3" > /proc/irq/108/smp_affinity_list + cat /proc/irq/108/effective_affinity_list # Output of cat is once again empty. We expect to see 3 here on a fixed kernel. - ps -eo psr,comm | grep irq/108 - 1 irq/108-eth%d # IRQ 108 is still running on CPU 1, but we expect CPU 3 here on a fixed kernel. - - + ps -eo psr,comm | grep irq/108 + 1 irq/108-eth%d # IRQ 108 is still running on CPU 1, but we expect CPU 3 here on a fixed kernel. [Regression Potential] The cherry-picked fixes from upstream should only impact the RP1 driver for the Raspberry Pi 5, and as far as I can tell there have been no reported issues upstream with these fixes so I believe the regression potential to be low. - - - [Other] - - # ** Also affects: linux-raspi (Ubuntu Resolute) Importance: Undecided Status: New ** Changed in: linux-raspi (Ubuntu Resolute) Status: New => In Progress -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2173779 Title: PREEMPT_RT: RP1 IRQ threads do not follow smp_affinity To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-raspi/+bug/2173779/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
