Wednesday, September 23, 2015

SoftIRQ priority

include/linux/interrupt.h

enum
{
HI_SOFTIRQ=0,
TIMER_SOFTIRQ,
NET_TX_SOFTIRQ,
NET_RX_SOFTIRQ,
BLOCK_SOFTIRQ,
BLOCK_IOPOLL_SOFTIRQ,
TASKLET_SOFTIRQ,
SCHED_SOFTIRQ,
HRTIMER_SOFTIRQ, /* Unused, but kept as tools rely on the
   numbering. Sigh! */
RCU_SOFTIRQ,    /* Preferable RCU should always be the last softirq */

NR_SOFTIRQS
};

tasklet_schedule(struct tasklet_struct *t)
   __tasklet_schedule(t);

__tasklet_schedule(struct tasklet_struct *t)
   raise_softirq_irqoff(TASKLET_SOFTIRQ);


--------- Timer ----------------
void __init init_timers(void)
open_softirq(TIMER_SOFTIRQ, run_timer_softirq);

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

void run_local_timers(void)
        hrtimer_run_queues();
raise_softirq(TIMER_SOFTIRQ);

void hrtimer_run_queues(void)
        now = hrtimer_update_base(cpu_base);
       __hrtimer_run_queues(cpu_base, now);