From owner-svn-src-all@FreeBSD.ORG Mon Feb 11 07:48:27 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 279DCD48; Mon, 11 Feb 2013 07:48:27 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 035A0AF1; Mon, 11 Feb 2013 07:48:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1B7mQvs003564; Mon, 11 Feb 2013 07:48:26 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1B7mQp4003563; Mon, 11 Feb 2013 07:48:26 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201302110748.r1B7mQp4003563@svn.freebsd.org> From: Adrian Chadd Date: Mon, 11 Feb 2013 07:48:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r246650 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Feb 2013 07:48:27 -0000 Author: adrian Date: Mon Feb 11 07:48:26 2013 New Revision: 246650 URL: http://svnweb.freebsd.org/changeset/base/246650 Log: Go back to direct-dispatch of the software queue and frame TX paths when they're being called from the TX completion handler. Going (back) through the taskqueue is just adding extra locking and latency to packet operations. This improves performance a little bit on most NICs. It still hasn't restored the original performance of the AR5416 NIC but the AR9160, AR9280 and later NICs behave very well with this. Tested: * AR5416 STA (still tops out at ~ 70mbit TCP, rather than 150mbit TCP..) * AR9160 hostap (good for both TX and RX) * AR9280 hostap (good for both TX and RX) Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Feb 11 02:54:24 2013 (r246649) +++ head/sys/dev/ath/if_ath.c Mon Feb 11 07:48:26 2013 (r246650) @@ -4226,7 +4226,9 @@ ath_tx_processq(struct ath_softc *sc, st /* Kick the software TXQ scheduler */ if (dosched) { - ath_tx_swq_kick(sc); + ATH_TX_LOCK(sc); + ath_txq_sched(sc, txq); + ATH_TX_UNLOCK(sc); } ATH_KTR(sc, ATH_KTR_TXCOMP, 1, @@ -4271,11 +4273,11 @@ ath_tx_proc_q0(void *arg, int npending) if (sc->sc_softled) ath_led_event(sc, sc->sc_txrix); + ath_txq_qrun(ifp); + ATH_PCU_LOCK(sc); sc->sc_txproc_cnt--; ATH_PCU_UNLOCK(sc); - - ath_tx_kick(sc); } /* @@ -4324,11 +4326,11 @@ ath_tx_proc_q0123(void *arg, int npendin if (sc->sc_softled) ath_led_event(sc, sc->sc_txrix); + ath_txq_qrun(ifp); + ATH_PCU_LOCK(sc); sc->sc_txproc_cnt--; ATH_PCU_UNLOCK(sc); - - ath_tx_kick(sc); } /* @@ -4369,11 +4371,11 @@ ath_tx_proc(void *arg, int npending) if (sc->sc_softled) ath_led_event(sc, sc->sc_txrix); + ath_txq_qrun(ifp); + ATH_PCU_LOCK(sc); sc->sc_txproc_cnt--; ATH_PCU_UNLOCK(sc); - - ath_tx_kick(sc); } #undef TXQACTIVE