Thursday, February 28, 2008

New form of interrupts - Message Signaled Interrupts

The other day I was looking at the /proc/interrupts file, and I found a line similar to below

494: [ ff] 46 PCI-MSI-edge eth4
495: [ ff] 0 PCI-MSI-edge eth4
496: [ ff] 0 PCI-MSI-edge eth4

First thing off is the presence of 3 interrupts for eth4 device, which is an NVidia NForce card with the forcedeth driver. Also the name "PCI-MSI-edge" is a type I have not head about before. The other was the range of the interrupt number - which was above 255, the max valid interrupt range.

After some googling, I found out that it was the new Message Signaled Interrupts, which were mandated by the PCIe standard. Now instead of a single interrupt, where we have to query the device for the actual event that happened, device drivers can put up an interrupt for each and every event - like in the case above one for rx, one for tx and other for link status etc. This simplifies and cleans up the code. On the hardware side, it makes interrupts in-band, and removes the necessity of a separate pin, reducing the chip's footprint.

Take a look at the <linux kernel src>/Documentation/MSI-HOWTO.txt for more details.

1 comment:

Vishi said...

that was cool dude. need to look into documentation in the link to get clear picture of what you are talking ;-)