Skip to contentSkip to conversation

Soft and Hard Interrupts

DISCUSSION Andreas Hess 1 participant 1 message May 26, 2004

lore
Share & tools
lore
#0 lore raw

Hi,

I have difficulties in understanding the interplay between hard and soft interrupts. Perhaps things get clearer with the following example:
1.) a packet is arriving at a NIC and triggers the execution of a hardware interrupt
2.) the do_irq() routine is called
3.) the according interrupt service routine (ISR) is executed (which triggers a soft interrupt)
4.) the kernel terminates the do_irq() routine and checks if there is a soft interrupt waiting to be processed
5.) the soft interrupt is processed

The higher the arrival rate of packets, the higher the amount of interrupts to be processed. In order to prevent the system from permanently processing interrupts --- in case that a certain threshold value is reached --- the ksoftirqd daemon takes over the responsibility for the software interrupt handling. Then software interrupts are processed in the event that the ksoftirqd is scheduled and running.
Is this so far correct? If yes, I wonder how the threshold value, the point at which the ksoftirqd gets into charge, is defined?
Please 'CC' me as I am not subscribed to the list.

Thanks Andreas