From owner-svn-src-user@FreeBSD.ORG Fri Sep 9 11:24:05 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 3E360106564A; Fri, 9 Sep 2011 11:24:05 +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 151EA8FC14; Fri, 9 Sep 2011 11:24:05 +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 p89BO4a7036317; Fri, 9 Sep 2011 11:24:04 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p89BO43K036315; Fri, 9 Sep 2011 11:24:04 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109091124.p89BO43K036315@svn.freebsd.org> From: Adrian Chadd Date: Fri, 9 Sep 2011 11:24:04 +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: r225460 - 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: Fri, 09 Sep 2011 11:24:05 -0000 Author: adrian Date: Fri Sep 9 11:24:04 2011 New Revision: 225460 URL: http://svn.freebsd.org/changeset/base/225460 Log: Begin adding some further debugging to chase down the TX hangs that I've seen under TCP TX load. It looks like the underlying problem is that some packets that are -before- the BAW are making it onto the software TX queue. These frames are outside the BAW (but before it, not after it) and thus the TX scheduling stops. The source of those grossly out of order (and likely already successfully TXed, but that's currently unknown) is currently unknown. Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c 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 Fri Sep 9 09:39:26 2011 (r225459) +++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Fri Sep 9 11:24:04 2011 (r225460) @@ -1821,6 +1821,13 @@ ath_tx_addto_baw(struct ath_softc *sc, s if (bf->bf_state.bfs_isretried) return; + if (bf->bf_state.bfs_addedbaw) + DPRINTF(sc, ATH_DEBUG_SW_TX_BAW, + "%s: re-added? tid=%d, seqno %d; window %d:%d; baw head=%d tail=%d\n", + __func__, tid->tid, SEQNO(bf->bf_state.bfs_seqno), + tap->txa_start, tap->txa_wnd, tid->baw_head, tid->baw_tail); + + tap = ath_tx_get_tx_tid(an, tid->tid); /* * ni->ni_txseqs[] is the currently allocated seqno. @@ -2087,6 +2094,7 @@ ath_tx_swq(struct ath_softc *sc, struct } else if (ath_tx_ampdu_pending(sc, an, tid)) { /* AMPDU pending; queue */ ATH_TXQ_INSERT_TAIL(atid, bf, bf_list); + /* XXX sched? */ } else if (ath_tx_ampdu_running(sc, an, tid)) { /* AMPDU running, attempt direct dispatch if possible */ if (txq->axq_depth < sc->sc_hwq_limit) @@ -2221,6 +2229,8 @@ ath_tx_tid_drain(struct ath_softc *sc, s struct ath_buf *bf; struct ieee80211_tx_ampdu *tap; struct ieee80211_node *ni = &an->an_node; + int t = 0; + struct ath_txq *txq = sc->sc_ac2q[tid->ac]; tap = ath_tx_get_tx_tid(an, tid->tid); @@ -2233,6 +2243,21 @@ ath_tx_tid_drain(struct ath_softc *sc, s break; } + if (t == 0) { + device_printf(sc->sc_dev, + "%s: node %p: tid %d: txq_depth=%d, " + "txq_aggr_depth=%d, sched=%d, paused=%d, " + "hwq_depth=%d, incomp=%d, baw_head=%d, baw_tail=%d " + "txa_start=%d, ni_txseqs=%d\n", + __func__, ni, tid->tid, txq->axq_depth, + txq->axq_aggr_depth, tid->sched, tid->paused, + tid->hwq_depth, tid->incomp, tid->baw_head, + tid->baw_tail, tap->txa_start, + ni->ni_txseqs[tid->tid]); + t = 1; + } + + /* * If the current TID is running AMPDU, update * the BAW.