前面了解了软中断的主要结构,对于软中断初始化主要时调用open_softirq()函数


其对前面介绍的softirq_vec数组赋值:


void open_softirq(int nr, void (*action)(struct softirq_action *))
{
 softirq_vec[nr].action = action;
}


块设备:blk_softirq_init open_softirq(BLOCK_SOFTIRQ, blk_done_softirq);

网络设备:net_dev_init open_softirq(NET_TX_SOFTIRQ, net_tx_action); open_softirq(NET_RX_SOFTIRQ, net_rx_action);

调度中负载均衡:init_sched_fair_class open_softirq(SCHED_SOFTIRQ, run_rebalance_domains);

任务延时tasklet:softirq_init open_softirq(TASKLET_SOFTIRQ, tasklet_action); open_softirq(HI_SOFTIRQ, tasklet_hi_action);    定时器类处理:init_timers open_softirq(TIMER_SOFTIRQ, run_timer_softirq);

RCU类处理:rcu_init open_softirq(RCU_SOFTIRQ, rcu_process_callbacks);