From owner-cvs-all@FreeBSD.ORG Mon Nov 13 22:39:23 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A41D016A68C; Mon, 13 Nov 2006 22:39:23 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id E257143E1D; Mon, 13 Nov 2006 22:36:34 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [10.10.3.185] ([165.236.175.187]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id kADMa5bU085570; Mon, 13 Nov 2006 15:36:11 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <4558F34E.6090705@samsco.org> Date: Mon, 13 Nov 2006 15:35:58 -0700 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060206 X-Accept-Language: en-us, en MIME-Version: 1.0 To: John Baldwin References: <200611132147.kADLlVok006575@repoman.freebsd.org> <200611131653.24403.jhb@freebsd.org> In-Reply-To: <200611131653.24403.jhb@freebsd.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=3.8 tests=none autolearn=failed version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on pooker.samsco.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 X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2006 22:39:23 -0000 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