'Problems with tasklets and interrupts in Linux

Let's assume that we have an interrupt handler and a tasklet in Linux. The tasklet is scheduled from this interrupt handler.

The interrupt handler works as a some kind of producer, and tasklet as consumer. The problem occurs when the tasklet runs for longer time and interrupt occures when this tasklet is still running. This interferences causes several calltraces in logs.

How to resolve this kind of interferences?

The only idea I've got is to move the interrupt handler to some workqueue or another tasklet and schedule it from the interrupt handler.

Is it ok? Any other ideas?



Solution 1:[1]

My suggestion is move the heavy process to the userspace, and add a frame drop

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Long Yang