From owner-cvs-all@FreeBSD.ORG Thu Jul 17 14:25:03 2008 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E52C510656CB; Thu, 17 Jul 2008 14:25:03 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 6B1B68FC1D; Thu, 17 Jul 2008 14:25:03 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.2/8.14.2) with ESMTP id m6HEOvFU032292; Thu, 17 Jul 2008 10:24:57 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Scott Long Date: Thu, 17 Jul 2008 08:57:13 -0400 User-Agent: KMail/1.9.7 References: <200807112121.m6BLL70t031426@repoman.freebsd.org> In-Reply-To: <200807112121.m6BLL70t031426@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200807170857.13575.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Thu, 17 Jul 2008 10:24:57 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/7736/Thu Jul 17 09:11:09 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/dev/ciss ciss.c cissio.h cissreg.h cissvar.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: Thu, 17 Jul 2008 14:25:04 -0000 On Friday 11 July 2008 05:20:51 pm Scott Long wrote: > scottl 2008-07-11 21:20:51 UTC > > FreeBSD src repository > > Modified files: > sys/dev/ciss ciss.c cissio.h cissreg.h cissvar.h > Log: > SVN rev 180454 on 2008-07-11 21:20:51Z by scottl > > A number of significant enhancements to the ciss driver: > > 3. Implemented MSI-X. Without any docs on this, I was just taking a > guess, and it appears to only work with the Performant method. This > could be a programming or understanding mistake on my part. While this > by itself made almost no difference to performance since the Performant > method already eliminated most of the synchronous reads over the PCI > bus, it did allow the CISS hardware to stop sharing its interrupt with > the USB hardware, which in turn allowed the driver to become decoupled > from the Giant-locked USB driver stack. This increased performance by > almost 20%. The MSI-X setup was done with 4 vectors allocated, but only > 1 vector used since the performant method was told to only use 1 of 4 > queues. Fiddling with this might make it work with the simpleq method, > not sure. I did not implement MSI since I have no MSI-specific hardware > in my test lab. One note here is that since you only use 1 message currently, you should really only alloc 1 message. That is: val = pci_msix_count(dev); if (val != CISS_MSI_COUNT) return (ENXIO); /* Currently only a single message is used. */ val = 1; error = pci_alloc_msix(dev, &val); ... The reason being that this "plays nicer" as far as system resource are concerned (only reserves 1 IDT slot vs 4 on x86 for example). In the case of MSI-X it also results in the same exact register updates since for MSI-X the count is never set in the config registers, instead we adjust each table entry during bus_setup_intr(). -- John Baldwin