svn commit: r225070 - user/adrian/if_ath_tx/sys/dev/ath
Adrian Chadd
adrian at FreeBSD.org
Mon Aug 22 04:33:49 UTC 2011
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);
More information about the svn-src-user
mailing list