world leader in high performance signal processing
Trace: » soft_irqs

Soft Irqs

First a review of some system services. These are deferred processing entities that can take over compute intensive or process intensive tasks from fast running interrupt routines.

  • Bottom halves. These are serialized globally so that only one can execute on ANY cpu at one time.
  • Tasklets. These are serialized per CPU so that a given tasklet will run to completion before being executed again.
  • Soft Irqs. Unlike bottom halfs and tasklets, soft irqs can be serviced at any time by any available CPU.

They are mainly used in network drivers where each packet must be serviced as fast as possible by any CPU available

The soft irq routine must be written so thet it permits this sort of operation. It must be reentrant.

The core kernel code is in linux-2.6.x/kernel/softirq.c.

The main kernel timer is another example of a well used soft Irq linux-2.6.x/kernel/timer.c

void run_local_timers(void)
void __init init_timers(void)
        timer_cpu_notify(&timers_nb, (unsigned long)CPU_UP_PREPARE,
                                (void *)(long)smp_processor_id());
        open_softirq(TIMER_SOFTIRQ, run_timer_softirq, NULL);

The system softirqs are defined in the file linux-2.6.x/include/linux/interrupt.h

enum {