From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 13 19:47:07 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 353EA1065677; Thu, 13 Nov 2008 19:47:07 +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 B29948FC17; Thu, 13 Nov 2008 19:47:06 +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.3/8.14.3) with ESMTP id mADJkO2s096236; Thu, 13 Nov 2008 14:47:00 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hardware@freebsd.org Date: Thu, 13 Nov 2008 14:41:16 -0500 User-Agent: KMail/1.9.7 References: <491BFB68.7050405@infoweapons.com> In-Reply-To: <491BFB68.7050405@infoweapons.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811131441.16427.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Thu, 13 Nov 2008 14:47:00 -0500 (EST) X-Virus-Scanned: ClamAV 0.93.1/8628/Thu Nov 13 10:57:02 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: freebsd-hackers@freebsd.org, "Ronnel P. Maglasang" Subject: Re: assigning interrupts X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 19:47:07 -0000 On Thursday 13 November 2008 05:03:20 am Ronnel P. Maglasang wrote: > Hi All, > > Is there a way to explicitly assign an interrupt > of a device? I'm running on 6.3 and the two NICs > share the same interrupt. Obviously this will affect > the performance if the NICs are exposed to heavy network > traffic. > > # vmstat -i > interrupt total rate > > irq11: em0 vr0+ 1081099 77 > > Total 16958562 1222 > > > Looking at the driver's code, I have the initial though > that this is the place where I can modify. > > -- > adapter->res_interrupt = bus_alloc_resource_any(dev, > SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE); > -- > > I've tried changing RF_SHAREABLE to RF_ALLOCATED or other > values but still could not get the desired result and worst > the device fail to initialize. Is this possible in 6.3? You can not easily assign them, no. In many cases the interrupt pins from the devices may be hardwired to a single input pin on an interrupt controller. In that case there is nothing you can do. You can read more about the gory details here: http://people.freebsd.org/~jhb/papers/bsdcan/2007/ -- John Baldwin