From owner-svn-src-user@FreeBSD.ORG Sun Oct 16 07:29:51 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 35B81106566B; Sun, 16 Oct 2011 07:29:51 +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 25D898FC14; Sun, 16 Oct 2011 07:29:51 +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 p9G7TpmN050807; Sun, 16 Oct 2011 07:29:51 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9G7TooB050805; Sun, 16 Oct 2011 07:29:50 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201110160729.p9G7TooB050805@svn.freebsd.org> From: Adrian Chadd Date: Sun, 16 Oct 2011 07:29:50 +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: r226417 - 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: Sun, 16 Oct 2011 07:29:51 -0000 Author: adrian Date: Sun Oct 16 07:29:50 2011 New Revision: 226417 URL: http://svn.freebsd.org/changeset/base/226417 Log: Move the TX taskqueue enqueue to later in the ath_intr() routine. I have this sneaking suspicion that preemption is the reason behind some of these TX hangs. Ie, the taskqueue enqueue caused the taskqueue process (which may be at the same priority as the ath_intr swi) to preempt it. Thus TX could occur before the TXQ status bits were properly set. Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath.c Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/if_ath.c Sun Oct 16 07:05:43 2011 (r226416) +++ user/adrian/if_ath_tx/sys/dev/ath/if_ath.c Sun Oct 16 07:29:50 2011 (r226417) @@ -1481,7 +1481,6 @@ ath_intr(void *arg) } if (status & HAL_INT_TX) { sc->sc_stats.ast_tx_intr++; - taskqueue_enqueue_fast(sc->sc_tq, &sc->sc_txtask); /* * Grab all the currently set bits in the HAL txq bitmap @@ -1493,6 +1492,7 @@ ath_intr(void *arg) ath_hal_gettxintrtxqs(sc->sc_ah, &txqs); sc->sc_txq_active |= txqs; ATH_UNLOCK(sc); + taskqueue_enqueue_fast(sc->sc_tq, &sc->sc_txtask); } if (status & HAL_INT_BMISS) { sc->sc_stats.ast_bmiss++;