RevolutionPi / piControl

Kernel module for data exchange with RevPi I/O-Modules and Gateways
81 stars 24 forks source link

piControl: compact: Lower priorities of kernel threads #66

Closed linosanfilippo-kunbus closed 2 years ago

linosanfilippo-kunbus commented 2 years ago

For compact the piControl module raises the priorities for the SPI (spi2) thread to a realtime priority of 61 and the priorities of the ain and i/o thread to 56 and 58 repectively. As it turned this leads to massive perfomance issues on the USB ethernet device. The reason seems to be that the USB worker threads (irq/X-dwc_otg) with the lower priority of 50 are starving now from time to time.

To fix this make sure that the spi2, ain and i/o threads are not higher prioritized than the USB worker threads.

Signed-off-by: Lino Sanfilippo l.sanfilippo@kunbus.com

iluminat23 commented 2 years ago

As we discussed yesterday, with this solution I get long timeouts on the USB LAN sometimes. And we decided that the only viable solution would be to boost the dwc_otg irq threads.

linosanfilippo-kunbus commented 2 years ago

Then I confused that. However there is already a pr from lukas which does exactly that (raising the dwc_otg helper thread priorities)

linosanfilippo-kunbus commented 2 years ago

So I will close this one.