Date: Sun, 23 May 2021 04:25:13 GMT From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: c50346bcf5c5 - main - ath: bump the default node queue size to 128 frames, not 64 Message-ID: <202105230425.14N4PDXw006219@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=c50346bcf5c5ccd0ef65d273edea6143f66c999f commit c50346bcf5c5ccd0ef65d273edea6143f66c999f Author: Adrian Chadd <adrian@FreeBSD.org> AuthorDate: 2021-05-23 04:23:00 +0000 Commit: Adrian Chadd <adrian@FreeBSD.org> CommitDate: 2021-05-23 04:23:00 +0000 ath: bump the default node queue size to 128 frames, not 64 It turns out that, silly adrian, setting it to 64 means only two AMPDU frames of 32 subframes each. Thus, whilst those are in-flight, any subsequent queues frames to that node get dropped. This ends up being pretty no bueno for performance if any receive is also going on at that point. Instead, set it to 128 for the time being to ensure that SOME frames get queued in the meantime. This results in some frames being immediately available in the software queue for transmit when the two existing A-MPDU frames have been completely sent, rather than the queue remaining empty until at least one is sent. It's not the best solution - I still think I'm scheduling receive far more often than giving time to schedule transmit work - but at least now I'm not starving the transmit side. Before this, a bidirectional iperf would show receive at ~ 150mbit/sec. but the transmit side at like 10kbit/sec. With it set to 128 it's now 150mbit/sec receive, and ~ 10mbit receive. It's better than 10kbit/sec, but still not as far as I'd like it to be. Tested: * AR9380/QCA934x (TL-WDR4300 AP), Macbook pro test STA + AR9380 test STA --- sys/dev/ath/if_ath.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index 4bc5c31812e7..3675cfc78654 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -1083,9 +1083,16 @@ ath_attach(u_int16_t devid, struct ath_softc *sc) /* * Default the maximum queue to 1/4'th the TX buffers, or - * 64, whichever is smaller. - */ - sc->sc_txq_node_maxdepth = MIN(64, ath_txbuf / 4); + * 128, whichever is smaller. + * + * Set it to 128 instead of the previous default (64) because + * at 64, two full A-MPDU subframes of 32 frames each is + * enough to treat this node queue as full and all subsequent + * traffic is dropped. Setting it to 128 means there'll + * hopefully be another 64 frames in the software queue + * to begin making A-MPDU frames out of. + */ + sc->sc_txq_node_maxdepth = MIN(128, ath_txbuf / 4); /* Enable CABQ by default */ sc->sc_cabq_enable = 1;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105230425.14N4PDXw006219>