Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Nov 2006 15:35:58 -0700
From:      Scott Long <scottl@samsco.org>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: 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
Message-ID:  <4558F34E.6090705@samsco.org>
In-Reply-To: <200611131653.24403.jhb@freebsd.org>
References:  <200611132147.kADLlVok006575@repoman.freebsd.org> <200611131653.24403.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4558F34E.6090705>