From owner-svn-src-user@FreeBSD.ORG Mon Aug 22 04:33:49 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C0101065670; Mon, 22 Aug 2011 04:33:49 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 630638FC0C; Mon, 22 Aug 2011 04:33:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p7M4XnGw033544; Mon, 22 Aug 2011 04:33:49 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p7M4XneM033541; Mon, 22 Aug 2011 04:33:49 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201108220433.p7M4XneM033541@svn.freebsd.org> From: Adrian Chadd Date: Mon, 22 Aug 2011 04:33:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225070 - user/adrian/if_ath_tx/sys/dev/ath X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Aug 2011 04:33:49 -0000 Author: adrian Date: Mon Aug 22 04:33:49 2011 New Revision: 225070 URL: http://svn.freebsd.org/changeset/base/225070 Log: Move the TX schedule taskqueue call out of the per-packet path and into ath_start(), and call it just once if any packets were queued. Add it back in the ath_tx_raw_xmit() path, so raw packets still cause the software TX scheduler to be queued to the ath task queue. This improves TCP performance a bit because of reduced CPU use, but UDP still isn't being aggregated. Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath.c user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/if_ath.c Mon Aug 22 03:10:29 2011 (r225069) +++ user/adrian/if_ath_tx/sys/dev/ath/if_ath.c Mon Aug 22 04:33:49 2011 (r225070) @@ -1908,6 +1908,7 @@ ath_start(struct ifnet *ifp) struct ath_buf *bf; struct mbuf *m, *next; ath_bufhead frags; + int tx = 0; if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || sc->sc_invalid) return; @@ -1944,6 +1945,7 @@ ath_start(struct ifnet *ifp) goto bad; } ifp->if_opackets++; + tx = 1; nextfrag: /* * Pass the frame to the h/w for transmission. @@ -1994,6 +1996,13 @@ ath_start(struct ifnet *ifp) sc->sc_wd_timer = 5; } + + /* + * Schedule the software TX process to occur + * if we transmitted at least one packet. + */ + if (tx) + ath_tx_sched_proc_sched(sc, NULL); } static int Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Mon Aug 22 03:10:29 2011 (r225069) +++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Mon Aug 22 04:33:49 2011 (r225070) @@ -1325,9 +1325,6 @@ ath_tx_start(struct ath_softc *sc, struc } else { /* add to software queue */ ath_tx_swq(sc, ni, txq, bf); - - /* Schedule a TX scheduler task call to occur */ - ath_tx_sched_proc_sched(sc, txq); } #else /* @@ -1552,9 +1549,6 @@ ath_tx_raw_start(struct ath_softc *sc, s else { /* Queue to software queue */ ath_tx_swq(sc, ni, sc->sc_ac2q[pri], bf); - - /* Schedule a TX scheduler task call to occur */ - ath_tx_sched_proc_sched(sc, sc->sc_ac2q[pri]); } return 0; @@ -1617,6 +1611,9 @@ ath_raw_xmit(struct ieee80211_node *ni, ifp->if_opackets++; sc->sc_stats.ast_tx_raw++; + /* Schedule a TX scheduler task call to occur */ + ath_tx_sched_proc_sched(sc, NULL); + return 0; bad2: ATH_TXBUF_LOCK(sc);