From owner-cvs-src@FreeBSD.ORG Wed Nov 15 22:56:47 2006 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B8C8716A415; Wed, 15 Nov 2006 22:56:47 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0540043D6A; Wed, 15 Nov 2006 22:56:46 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id kAFMub0O035027; Wed, 15 Nov 2006 17:56:38 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: "M. Warner Losh" Date: Wed, 15 Nov 2006 17:56:30 -0500 User-Agent: KMail/1.9.1 References: <20061115215142.GB74745@rambler-co.ru> <455B963A.4050200@samsco.org> <20061115.155143.1021575615.imp@bsdimp.com> In-Reply-To: <20061115.155143.1021575615.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200611151756.31047.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Wed, 15 Nov 2006 17:56:38 -0500 (EST) X-Virus-Scanned: ClamAV 0.88.3/2197/Wed Nov 15 15:23:52 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 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, scottl@samsco.org, src-committers@freebsd.org, ru@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/dev/bce if_bce.c src/sys/dev/em if_em.c if_em.h src/sys/dev/mpt mpt.h mpt_pci.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2006 22:56:47 -0000 On Wednesday 15 November 2006 17:51, M. Warner Losh wrote: > In message: <455B963A.4050200@samsco.org> > Scott Long writes: > : John Baldwin wrote: > : > On Wednesday 15 November 2006 16:51, Ruslan Ermilov wrote: > : >> On Thu, Nov 16, 2006 at 12:51:19AM +0300, Ruslan Ermilov wrote: > : >>> On Wed, Nov 15, 2006 at 08:04:57PM +0000, John Baldwin wrote: > : >>>> jhb 2006-11-15 20:04:57 UTC > : >>>> > : >>>> FreeBSD src repository > : >>>> > : >>>> Modified files: > : >>>> sys/dev/bce if_bce.c > : >>>> sys/dev/em if_em.c if_em.h > : >>>> sys/dev/mpt mpt.h mpt_pci.c > : >>>> Log: > : >>>> Add MSI support to em(4), bce(4), and mpt(4). For now, we only > : > support > : >>>> devices that support a maximum of 1 message, and we use that 1 message > : >>>> instead of the INTx rid 0 IRQ with the same interrupt handler, etc. > : >>>> > : >>>> Revision Changes Path > : >>>> 1.19 +11 -3 src/sys/dev/bce/if_bce.c > : >>>> 1.164 +11 -2 src/sys/dev/em/if_em.c > : >>>> 1.56 +1 -0 src/sys/dev/em/if_em.h > : >>>> 1.31 +1 -0 src/sys/dev/mpt/mpt.h > : >>>> 1.39 +14 -1 src/sys/dev/mpt/mpt_pci.c > : >>>> > : >>> How will the "vmstat -i" output look like for MSI-enabled devices? > : >>> > : >> irqXXXX, where XXXX>=1024? > : > > : > s/1024/256/ > : > > : > : There is a problem here, though. Newbus prints out the IRQ number after > : a successful device probe phase. It has no knowledge of MSI at that > : point, so it just prints out the traditional IRQ value. At some point, > : this needs to be fixed. Having the driver tell newbus about its MSI > : intentions in the probe routine is unrealistic, so there is no quick > : fix there. Probably need to delay printing the device message until > : later in the attach routine, once the driver has set up all of the > : resources. > > I've been wanting to move the printing of the attach string from > post-probe, pre-attach to post-attach for some time now. We would > then report the resources assigned to the device. I'm not sure if I'd > print all the resources assigned, or only those the driver activates. > Both sides of the argument have merit, imho. On the pro side, > resources are used, and printing them will help highlight conflicts. > On the con side, people think it clutters things up too much and might > lead to false expectations. > > When I've mentioned this desire at various developer summits, I was > told basically "go for it, but only at freebsd X.0 since people have > dmesg parsers" by many people (maybe even including Scott). Also, the way it works now, if attach fails and the routine prints out error messages, you get to see line for the device first with the initial resources and then you see the error message from the driver. If you move the printf down, then all you get is an error message from the driver. At the very least this would break POLA for a lot of our users. I'm still undecided. I could add a printf when a device ends up succesfully allocating MSI or MSI-X IRQs if people desired. -- John Baldwin