From owner-svn-src-head@FreeBSD.ORG Sat Apr 10 15:55:08 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F21211065670; Sat, 10 Apr 2010 15:55:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id 7BE448FC08; Sat, 10 Apr 2010 15:55:07 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id DBB9B41C752; Sat, 10 Apr 2010 17:55:05 +0200 (CEST) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id H2Krgcn+XOW7; Sat, 10 Apr 2010 17:55:05 +0200 (CEST) Received: by mail.cksoft.de (Postfix, from userid 66) id 5FB1141C751; Sat, 10 Apr 2010 17:55:05 +0200 (CEST) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 535414448EC; Sat, 10 Apr 2010 15:53:42 +0000 (UTC) Date: Sat, 10 Apr 2010 15:53:42 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Jack F Vogel In-Reply-To: <201004091842.o39IgFbb031014@svn.freebsd.org> Message-ID: <20100410155034.X40281@maildrop.int.zabbadoz.net> References: <201004091842.o39IgFbb031014@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206429 - head/sys/dev/e1000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2010 15:55:08 -0000 On Fri, 9 Apr 2010, Jack F Vogel wrote: > Author: jfv > Date: Fri Apr 9 18:42:15 2010 > New Revision: 206429 > URL: http://svn.freebsd.org/changeset/base/206429 > > Log: > Incorporate suggested improvements from yongari. > > Also, from feedback, make the multiqueue code an > option (EM_MULTIQUEUE) that is off by default. > Problems have been seen with UDP when its on. > > Modified: > head/sys/dev/e1000/if_em.c > head/sys/dev/e1000/if_em.h > > Modified: head/sys/dev/e1000/if_em.c > ============================================================================== > --- head/sys/dev/e1000/if_em.c Fri Apr 9 18:02:19 2010 (r206428) > +++ head/sys/dev/e1000/if_em.c Fri Apr 9 18:42:15 2010 (r206429) .. > @@ -1427,28 +1443,23 @@ em_handle_que(void *context, int pending > struct ifnet *ifp = adapter->ifp; > struct tx_ring *txr = adapter->tx_rings; > struct rx_ring *rxr = adapter->rx_rings; > - u32 loop = EM_MAX_LOOP; > - bool more_rx, more_tx; > + bool more_rx; > > > if (ifp->if_drv_flags & IFF_DRV_RUNNING) { > + more_rx = em_rxeof(rxr, adapter->rx_process_limit); > EM_TX_LOCK(txr); > - do { > - more_rx = em_rxeof(rxr, adapter->rx_process_limit); Booting with NFS root I got a panic: 208089 Trying to mount root from nfs: .. 208107 panic: mutex em0:rx(0) not owned at /zoo/bz/HEAD_clean.svn/sys/dev/e1000/if_em.c:4093 .. 208138 db> where 208139 Tracing pid 0 tid 100050 td 0xffffff0001c43ab0 208140 kdb_enter() at kdb_enter+0x3d 208141 panic() at panic+0x1cc 208142 _mtx_assert() at _mtx_assert+0x7d 208143 em_rxeof() at em_rxeof+0x3b 208144 em_handle_que() at em_handle_que+0x4a 208145 taskqueue_run() at taskqueue_run+0xeb 208146 taskqueue_thread_loop() at taskqueue_thread_loop+0x50 208147 fork_exit() at fork_exit+0x14a 208148 fork_trampoline() at fork_trampoline+0xe 208149 --- trap 0, rip = 0, rsp = 0xffffff80001c9d30, rbp = 0 --- Not sure if this would be the correct fix locking wise but it might; at least this is where em_rxeof() get's called w/o the locking and triggers the assert. Index: sys/dev/e1000/if_em.c =================================================================== --- sys/dev/e1000/if_em.c (revision 206455) +++ sys/dev/e1000/if_em.c (working copy) @@ -1447,7 +1447,9 @@ em_handle_que(void *context, int pending) if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + EM_RX_LOCK(rxr); more_rx = em_rxeof(rxr, adapter->rx_process_limit); + EM_RX_UNLOCK(rxr); EM_TX_LOCK(txr); em_txeof(txr); #ifdef EM_MULTIQUEUE -- Bjoern A. Zeeb It will not break if you know what you are doing.