hzeller / rpi-rgb-led-matrix

Controlling up to three chains of 64x64, 32x32, 16x32 or similar RGB LED displays using Raspberry Pi GPIO
GNU General Public License v2.0
3.71k stars 1.17k forks source link

Processor affinity not working? #269

Closed tigertone closed 7 years ago

tigertone commented 7 years ago

With isolcpus=3 set in /boot/cmdline.txt on a pi3, the process doesn't seem to be locked to the 3rd core ( when I run 'taskset -c -p 1136', it returns: current affinity list: 0-2 (does this mean it's actively avoiding the 3rd core?). This is when using the led-image-viewer function.

Thanks

hzeller commented 7 years ago

With isolcpus=3 you tell the kernel to actively avoid scheduling something on CPU 3 unless it is requesting to run there. Probably that is what taskset is returning ?

rpi-rgb-led-matrix is explicitly requesting core 3 for the matrix update, and no specific affinity for everything else. So if you go in top and press 1 (to show the individual CPU percentages) and H (to show individual threads), you see that there is one rpi-rgb-led-matrix thread that is hogging the Cpu3 - this is the update thread for the matrix. The others are using whatever is there 0-2.

Not sure if taskset is picking that up properly.