summaryrefslogtreecommitdiffstats
path: root/sys/dev/ath/if_ath_ahb.c
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2012-10-31 06:27:58 +0000
committeradrian <adrian@FreeBSD.org>2012-10-31 06:27:58 +0000
commit2ef1c4bedf3c641afa094dc1884ae414c7b3a817 (patch)
treebba55723b066c6e673485dd00b27f66f8b52247c /sys/dev/ath/if_ath_ahb.c
parent62321d8c39c06b876dcaa4387d78d43fc147eaf1 (diff)
downloadFreeBSD-src-2ef1c4bedf3c641afa094dc1884ae414c7b3a817.zip
FreeBSD-src-2ef1c4bedf3c641afa094dc1884ae414c7b3a817.tar.gz
I give up - introduce a TX lock to serialise TX operations.
I've tried serialising TX using queues and such but unfortunately due to how this interacts with the locking going on elsewhere in the networking stack, the TX task gets delayed, resulting in quite a noticable throughput loss: * baseline TCP for 2x2 11n HT40 is ~ 170mbit/sec; * TCP for TX task in the ath taskq, with the RX also going on - 80mbit/sec; * TCP for TX task in a separate, second taskq - 100mbit/sec. So for now I'm going with the Linux wireless stack approach - lock tx early. The linux code does in the wireless stack, before the 802.11 state stuff happens and before it's punted to the driver. But TX locking needs to also occur at the driver layer as the TX completion code _also_ begins to drain the ifnet TX queue. Whilst I'm here, add some KTR traces for the TX path. Note: * This really should be done at the net80211 layer (as well, at least.) But that'll have to wait for a little more thought to happen.
Diffstat (limited to 'sys/dev/ath/if_ath_ahb.c')
-rw-r--r--sys/dev/ath/if_ath_ahb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/ath/if_ath_ahb.c b/sys/dev/ath/if_ath_ahb.c
index 1d8d7ac..cca0116 100644
--- a/sys/dev/ath/if_ath_ahb.c
+++ b/sys/dev/ath/if_ath_ahb.c
@@ -194,6 +194,7 @@ ath_ahb_attach(device_t dev)
ATH_LOCK_INIT(sc);
ATH_PCU_LOCK_INIT(sc);
ATH_RX_LOCK_INIT(sc);
+ ATH_TX_LOCK_INIT(sc);
ATH_TXSTATUS_LOCK_INIT(sc);
error = ath_attach(AR9130_DEVID, sc);
@@ -202,6 +203,7 @@ ath_ahb_attach(device_t dev)
ATH_TXSTATUS_LOCK_DESTROY(sc);
ATH_RX_LOCK_DESTROY(sc);
+ ATH_TX_LOCK_DESTROY(sc);
ATH_PCU_LOCK_DESTROY(sc);
ATH_LOCK_DESTROY(sc);
bus_dma_tag_destroy(sc->sc_dmat);
@@ -244,6 +246,7 @@ ath_ahb_detach(device_t dev)
ATH_TXSTATUS_LOCK_DESTROY(sc);
ATH_RX_LOCK_DESTROY(sc);
+ ATH_TX_LOCK_DESTROY(sc);
ATH_PCU_LOCK_DESTROY(sc);
ATH_LOCK_DESTROY(sc);
OpenPOWER on IntegriCloud