softirq

How to define and trigger my own new softirq in linux kernel?

你。 提交于 2019-12-21 04:43:47
问题 I would like to create my own softirq in linux kernel. Is it the right way to do that: In the init of the module I would like to trigger the softirq from I'll add a call to: 394 void open_softirq(int nr, void (*action)(struct softirq_action *)) 395 { 396 softirq_vec[nr].action = action; 397 } And in the snippet I would like to raise the softirq I'll add a call to raise_softirq function: 379 void raise_softirq(unsigned int nr) 380 { 381 unsigned long flags; 382 383 local_irq_save(flags); 384

Which context are softirq and tasklet in?

回眸只為那壹抹淺笑 提交于 2019-11-30 10:48:52
问题 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. Another question to softirq and tasklet is that why sleep are not allowed during execution?? Can anyone help me identify these questions, thanks!! 回答1: The softirq and tasklet are both kind of bottom-halves

Which context are softirq and tasklet in?

荒凉一梦 提交于 2019-11-29 22:33:22
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. Another question to softirq and tasklet is that why sleep are not allowed during execution?? Can anyone help me identify these questions, thanks!! 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,