softirq 和 tasklet 在哪个上下文中? [英] Which context are softirq and tasklet in?

查看:27
本文介绍了softirq 和 tasklet 在哪个上下文中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道有进程上下文和中断上下文,但我不明白在执行softirq或tasklet时,它是在哪个上下文下运行的.

I know that there are process context and interrupt context but I don't understand when executing softirq or tasklet, which context is it run under.

我看到有些人使用术语下半部分上下文",如果有这样的术语,与其他术语相比有什么区别.

I have seen some people use the term "bottom-halves context", if there's such term, what's the difference comparing with the others.

softirq 和 tasklet 的另一个问题是为什么在执行过程中不允许睡眠??

Another question to softirq and tasklet is that why sleep are not allowed during execution??

谁能帮我找出这些问题,谢谢!!

Can anyone help me identify these questions, thanks!!

推荐答案

softirq 和 tasklet 都是一种底层机制.睡眠是不允许的,因为它们在中断上下文而不是进程上下文下运行.如果允许睡眠,则 linux 无法安排它们并最终导致内核崩溃并出现 dequeue_task 错误.中断上下文甚至没有描述寄存器信息的数据结构,因此它们永远不会被 linux 调度.如果设计成具有这种结构并且可以调度,则中断处理过程的性能将受到影响.

The softirq and tasklet are both kind of bottom-halves mechanism. Sleep is not allowed becuase they run under interrupt context not process context. If sleep is allowed, then the linux cannot schedule them and finally cause a kernel panic with a dequeue_task error. The interrupt context does not even have a data structure describing the register info, so they can never be scheduled by linux. If it is designed to have that structure and can be scheduled, the performance for interrupt handling process will be effected.

这篇关于softirq 和 tasklet 在哪个上下文中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆