From owner-svn-src-head@FreeBSD.ORG Tue Jul 31 15:13:29 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 58160106564A for ; Tue, 31 Jul 2012 15:13:29 +0000 (UTC) (envelope-from andrey@zonov.org) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id D410E8FC16 for ; Tue, 31 Jul 2012 15:13:28 +0000 (UTC) Received: by eaak11 with SMTP id k11so444789eaa.13 for ; Tue, 31 Jul 2012 08:13:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=4Km2o9pXhWgjzCr43Dmq4TkD4BVXz6Q9hXcMjCRPAsM=; b=C35mquBam5BAeUYxWXkSm2VNUMKjXZSq7Q9hhGGaUj8p03Az9ZNUsafEf//qy6EVL2 x/KckcW2hvJEj6zETg3X7N1blQB3tCfWXAa+46wJLYX9D8gB1stFrX/foJ5NN1Vr0BH4 /6UqwZKxnpBR0knXQhg2ao8py0Rqo2KJSRNObB1xSt7ImIh9aNZhzPXFoIeuIXufCv+P Fgmh4bBL52o796vjbymoNQb229ZO/sRchn0ebb3MRK3xLQqDEMuoWKEK9p1t0hjPCSXl /S6pJaxKwpWK/d0Ie35jYdB1x7QLcnktfryrD9wqlM52B28otuRu7PqXzwmp1om494My jxNA== Received: by 10.14.178.67 with SMTP id e43mr17232102eem.44.1343747607586; Tue, 31 Jul 2012 08:13:27 -0700 (PDT) Received: from dhcp170-243-red.yandex.net ([2a02:6b8:0:401:310a:7c4c:34eb:8b2]) by mx.google.com with ESMTPS id g46sm1025163eep.15.2012.07.31.08.13.25 (version=SSLv3 cipher=OTHER); Tue, 31 Jul 2012 08:13:26 -0700 (PDT) Message-ID: <5017F614.1010304@zonov.org> Date: Tue, 31 Jul 2012 19:13:24 +0400 From: Andrey Zonov User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Adrian Chadd References: <201207251128.q6PBSFlt052575@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQnyZfJiPw2Dx0+YjVjNwVH//l5RutL1vcpmXIlVD7NKwMknbjXrdMtaAtkjAm7PoPBOFSly Cc: svn-src-head@freebsd.org, Luigi Rizzo , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r238765 - 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: Tue, 31 Jul 2012 15:13:29 -0000 On 7/28/12 2:09 AM, Adrian Chadd wrote: > Hi, > > Can you please revert this commit for now? > > * it has some netmap stuff in it that isn't related to the commit; > * it's causing panics due to lock recursion; I can confirm panics with the latest HEAD running under ESX. _mtx_lock_sleep: recursed on non-recursive mutex em0 @ /usr/src/sys/dev/e1000/if_lem.c:881 Tracing pid 12 tid 100030 td 0xfffffe0002960480 kdb_enter() at kdb_enter+0x3b panic() at panic+0x1d1 _mtx_lock_sleep() at _mtx_lock_sleep+0x35f _mtx_lock_flags() at _mtx_lock_flags+0x111 lem_start() at lem_start+0x34 if_transmit() at if_transmit+0xd6 ether_output_frame() at ether_output_frame+0x45 ether_output() at ether_output+0x548 arpintr() at arpintr+0x10c1 netisr_dispatch_src() at netisr_dispatch_src+0x152 ether_demux() at ether_demux+0x18d ether_nh_input() at ether_nh_input+0x290 netisr_dispatch_src() at netisr_dispatch_src+0x152 lem_intr() at lem_intr+0x3ba intr_event_execute_handlers() at intr_event_execute_handlers+0x6a ithread_loop() at ithread_loop+0xab fork_exit() at fork_exit+0x135 fork_trampoline() at fork_trampoline+0xe --- trap 0, rip = 0, rsp = 0xffffff8000301cb0, rbp = 0 --- > * it likely has other issues you haven't yet found. :) > > > > Adrian > > On 25 July 2012 04:28, Luigi Rizzo wrote: >> Author: luigi >> Date: Wed Jul 25 11:28:15 2012 >> New Revision: 238765 >> URL: http://svn.freebsd.org/changeset/base/238765 >> >> Log: >> Use legacy interrupts as a default. This gives up to 10% speedup >> when used in qemu (and this driver is for non-PCIe cards, >> so probably its largest use is in virtualized environments). >> >> Approved by: Jack Vogel >> MFC after: 3 days >> >> Modified: >> head/sys/dev/e1000/if_lem.c >> >> Modified: head/sys/dev/e1000/if_lem.c >> ============================================================================== >> --- head/sys/dev/e1000/if_lem.c Wed Jul 25 10:55:14 2012 (r238764) >> +++ head/sys/dev/e1000/if_lem.c Wed Jul 25 11:28:15 2012 (r238765) >> @@ -239,6 +239,7 @@ static void lem_enable_wakeup(device >> static int lem_enable_phy_wakeup(struct adapter *); >> static void lem_led_func(void *, int); >> >> +#define EM_LEGACY_IRQ /* slightly faster, at least in qemu */ >> #ifdef EM_LEGACY_IRQ >> static void lem_intr(void *); >> #else /* FAST IRQ */ >> @@ -1549,6 +1550,13 @@ lem_xmit(struct adapter *adapter, struct >> u32 txd_upper, txd_lower, txd_used, txd_saved; >> int error, nsegs, i, j, first, last = 0; >> >> +extern int netmap_drop; >> + if (netmap_drop == 95) { >> +dropme: >> + m_freem(*m_headp); >> + *m_headp = NULL; >> + return (ENOBUFS); >> + } >> m_head = *m_headp; >> txd_upper = txd_lower = txd_used = txd_saved = 0; >> >> @@ -1688,6 +1696,9 @@ lem_xmit(struct adapter *adapter, struct >> } >> } >> >> + if (netmap_drop == 96) >> + goto dropme; >> + >> adapter->next_avail_tx_desc = i; >> >> if (adapter->pcix_82544) >> @@ -1715,6 +1726,16 @@ lem_xmit(struct adapter *adapter, struct >> */ >> ctxd->lower.data |= >> htole32(E1000_TXD_CMD_EOP | E1000_TXD_CMD_RS); >> + >> +if (netmap_drop == 97) { >> + static int count=0; >> + if (count++ & 63 != 0) >> + ctxd->lower.data &= >> + ~htole32(E1000_TXD_CMD_RS); >> + else >> + D("preserve RS"); >> + >> +} >> /* >> * Keep track in the first buffer which >> * descriptor will be written back >> @@ -1733,6 +1754,12 @@ lem_xmit(struct adapter *adapter, struct >> adapter->link_duplex == HALF_DUPLEX) >> lem_82547_move_tail(adapter); >> else { >> +extern int netmap_repeat; >> + if (netmap_repeat) { >> + int x; >> + for (x = 0; x < netmap_repeat; x++) >> + E1000_WRITE_REG(&adapter->hw, E1000_TDT(0), i); >> + } >> E1000_WRITE_REG(&adapter->hw, E1000_TDT(0), i); >> if (adapter->hw.mac.type == e1000_82547) >> lem_82547_update_fifo_head(adapter, >> @@ -2986,6 +3013,13 @@ lem_txeof(struct adapter *adapter) >> return; >> } >> #endif /* DEV_NETMAP */ >> +{ >> + static int drops = 0; >> + if (netmap_copy && drops++ < netmap_copy) >> + return; >> + drops = 0; >> +} >> + >> if (adapter->num_tx_desc_avail == adapter->num_tx_desc) >> return; >> > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > -- Andrey Zonov