简体   繁体   English

"Linux 中的小任务和中断问题"

[英]Problems with tasklets and interrupts in Linux

Let's assume that we have an interrupt handler and a tasklet in Linux.假设我们在 Linux 中有一个中断处理程序和一个 tasklet。 The tasklet is scheduled from this interrupt handler. tasklet 是从这个中断处理程序中调度的。

The interrupt handler works as a some kind of producer, and tasklet as consumer.中断处理程序作为某种生产者工作,而 tasklet 作为消费者工作。 The problem occurs when the tasklet runs for longer time and interrupt occures when this tasklet is still running.当 tasklet 运行时间较长时会出现问题,并且当 tasklet 仍在运行时会发生中断。 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?还有其他想法吗?

"

我的建议是将繁重的进程移至用户空间,并添加丢帧

"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM