cvs commit: src/sys/dev/acpica acpi_pcib_acpi.c acpi_pcib_pci.c src/sys/dev/pci pci.c pci_if.m pci_pci.c pci_private.h pcib_if.m pcib_private.h pcireg.h pcivar.h

Scott Long scottl at samsco.org
Mon Nov 13 22:39:23 UTC 2006


John Baldwin wrote:
> On Monday 13 November 2006 16:47, John Baldwin wrote:
> 
>>jhb         2006-11-13 21:47:30 UTC
>>
>>  FreeBSD src repository
>>
>>  Modified files:
>>    sys/dev/acpica       acpi_pcib_acpi.c acpi_pcib_pci.c 
>>    sys/dev/pci          pci.c pci_if.m pci_pci.c pci_private.h 
>>                         pcib_if.m pcib_private.h pcireg.h 
>>                         pcivar.h 
>>  Log:
>>  First cut at MI support for PCI Message Signalled Interrupts (MSI):
>>  - Add 3 new functions to the pci_if interface along with suitable wrappers
>>    to provide the device driver visible API:
> 
> 
> The patches I used for em, bce, and mpt are available at 
> http://www.freebsd.org/~jhb/patches/msi_dev.patch
> 
> For devices that only support 1 message, the only change is to call 
> pci_alloc_msi() and then use rid 1 instead of rid 0 for SYS_RES_IRQ.
> 

And just so everyone else knows, BGE and MFI have also been prototyped
and tested.  BGE claims support for multiple messages, so I'll be
experimenting with that at some point.  MFI also supports multiple
messages, but appears to only use one of them.  Once the MD part of MSI
is committed, I'll commit the changes to these drivers.  That can then
be used as a code pattern for other drivers.

The advantages to MSI is that you virtually eliminate interrupt sharing,
and on most devices you eliminate the need to do a PCI read in the
interrupt handler.  For the MFI driver, I recorded an approx 20%
reduction in CPU time when I switched to MSI.  Network drivers will
likely benefit even more.

Thanks a lot to John, Peter Grehan, and Jack Vogel for working on this.

Scott


More information about the cvs-src mailing list