From owner-svn-src-user@FreeBSD.ORG Mon Sep 19 00:46:50 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 252BD106564A; Mon, 19 Sep 2011 00:46:50 +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 EF6898FC18; Mon, 19 Sep 2011 00:46: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 p8J0knch056306; Mon, 19 Sep 2011 00:46:49 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p8J0kn2R056304; Mon, 19 Sep 2011 00:46:49 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109190046.p8J0kn2R056304@svn.freebsd.org> From: Adrian Chadd Date: Mon, 19 Sep 2011 00:46: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: r225654 - 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, 19 Sep 2011 00:46:50 -0000 Author: adrian Date: Mon Sep 19 00:46:49 2011 New Revision: 225654 URL: http://svn.freebsd.org/changeset/base/225654 Log: Revert the FIFO TX scheduling part of the previous commit. There's a bug somewhere in the code which causes TX latency to jump dramatically and this indicates some scheduling bugs. I'll squeeze out those bugs and then re-commit the FIFO TX scheduling. 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 Sun Sep 18 15:11:54 2011 (r225653) +++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Mon Sep 19 00:46:49 2011 (r225654) @@ -3486,20 +3486,11 @@ ath_tx_tid_hw_queue_norm(struct ath_soft * This function walks the list of TIDs (ie, ath_node TIDs * with queued traffic) and attempts to schedule traffic * from them. - * - * TID's are rescheduled in a FIFO method - ie, once they've - * been handled, if they're removed and re-added to the end of - * the queue if they have more traffic. The hardware takes care - * of implementing the hardware side of WME QoS scheduling. - * - * Since the TXQ lock is held here, it should be safe to take - * a pointer to the last ath_tid in the TXQ array, as nothing - * in the scheduler should cause it to disappear. */ void ath_txq_sched(struct ath_softc *sc, struct ath_txq *txq) { - struct ath_tid *tid, *next, *last_tid = NULL; + struct ath_tid *tid, *next; ATH_TXQ_LOCK_ASSERT(txq); @@ -3513,43 +3504,35 @@ ath_txq_sched(struct ath_softc *sc, stru return; } - last_tid = TAILQ_LAST(&txq->axq_tidq, axq_t_s); - + /* + * For now, let's not worry about QoS, fair-scheduling + * or the like. That's a later problem. Just throw + * packets at the hardware. + */ TAILQ_FOREACH_SAFE(tid, &txq->axq_tidq, axq_qelem, next) { /* - * Remove the entry; we'll re-queue it at the end - * if it needs to be. - */ - ath_tx_tid_unsched(sc, tid); - - /* * Suspend paused queues here; they'll be resumed * once the addba completes or times out. */ DPRINTF(sc, ATH_DEBUG_SW_TX, "%s: tid=%d, paused=%d\n", __func__, tid->tid, tid->paused); - if (tid->paused) + if (tid->paused) { + ath_tx_tid_unsched(sc, tid); continue; - + } if (ath_tx_ampdu_running(sc, tid->an, tid->tid)) ath_tx_tid_hw_queue_aggr(sc, tid->an, tid); else ath_tx_tid_hw_queue_norm(sc, tid->an, tid); - /* Still has frames? Re-schedule */ - if (tid->axq_depth > 0) - ath_tx_tid_sched(sc, tid); + /* Empty? Remove */ + if (tid->axq_depth == 0) + ath_tx_tid_unsched(sc, tid); /* Give the software queue time to aggregate more packets */ if (txq->axq_aggr_depth >= sc->sc_hwq_limit) { break; } - - /* - * If this is the last TID in the original list, break. - */ - if (tid == last_tid) - break; } }