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

查看:232
本文介绍了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天全站免登陆