From owner-svn-src-head@FreeBSD.ORG Wed May 15 04:10:24 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 7C38E4C2; Wed, 15 May 2013 04:10:24 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from mail1.ozon.ru (mx4.ozon.ru [194.186.179.140]) by mx1.freebsd.org (Postfix) with ESMTP id D733E363; Wed, 15 May 2013 04:10:23 +0000 (UTC) Received: from intmail03msk.ozon (intmail03msk.ozon [10.18.18.171]) by mail1.ozon.ru (Postfix) with ESMTP id 22C6071A50E; Wed, 15 May 2013 08:10:22 +0400 (MSK) Received: from mail pickup service by intmail03msk.ozon with Microsoft SMTPSVC; Wed, 15 May 2013 08:10:21 +0400 Received: from intmail03msk.ozon ([10.18.18.171]) by intmail02msk.ozon with Microsoft SMTPSVC(6.0.3790.4675); Mon, 13 May 2013 23:21:13 +0400 Received: from mail1.ozon.ru ([194.186.179.140]) by intmail03msk.ozon with Microsoft SMTPSVC(6.0.3790.4675); Mon, 13 May 2013 23:03:34 +0400 Received: from localhost (localhost [127.0.0.1]) by mail1.ozon.ru (Postfix) with ESMTP id CB1CE71A7EC for ; Mon, 13 May 2013 23:03:34 +0400 (MSK) X-Virus-Scanned: amavisd-new at ozon.ru Received: from mail1.ozon.ru ([127.0.0.1]) by localhost (mx4.ozon.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0t66xy1dLHh1 for ; Mon, 13 May 2013 23:03:27 +0400 (MSK) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received-SPF: pass (freebsd.org: 8.8.178.116 is authorized to use 'owner-svn-src-all@freebsd.org' in 'mfrom' identity (mechanism 'ip4:8.8.178.116' matched)) receiver=mx4.ozon.ru; identity=mfrom; envelope-from="owner-svn-src-all@freebsd.org"; helo=mx2.freebsd.org; client-ip=8.8.178.116 Received: from mx2.freebsd.org (mx2.FreeBSD.org [8.8.178.116]) by mail1.ozon.ru (Postfix) with ESMTP id 3177F71A7E8 for ; Mon, 13 May 2013 23:03:27 +0400 (MSK) Received: from hub.freebsd.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) by mx2.freebsd.org (Postfix) with ESMTP id 729F82C7F; Mon, 13 May 2013 19:03:26 +0000 (UTC) Received: from hub.freebsd.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) by hub.freebsd.org (Postfix) with ESMTP id 70320909; Mon, 13 May 2013 19:03:26 +0000 (UTC) (envelope-from owner-svn-src-all@freebsd.org) Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A18A27A1; Mon, 13 May 2013 19:03:13 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9404A26B; Mon, 13 May 2013 19:03:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4DJ3DuL045335; Mon, 13 May 2013 19:03:13 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4DJ3DHm045333; Mon, 13 May 2013 19:03:13 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201305131903.r4DJ3DHm045333@svn.freebsd.org> From: Adrian Chadd Date: Mon, 13 May 2013 19:03:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r250609 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: owner-svn-src-all@freebsd.org Sender: owner-svn-src-all@freebsd.org X-OriginalArrivalTime: 13 May 2013 19:03:34.0829 (UTC) FILETIME=[915305D0:01CE500C] X-BeenThere: svn-src-head@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 May 2013 04:10:24 -0000 Author: adrian Date: Mon May 13 19:03:12 2013 New Revision: 250609 URL: http://svnweb.freebsd.org/changeset/base/250609 Log: Since the node state is 100% back under the TX lock, just kill the use of atomics. I'll re-think this nonsense later. Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon May 13 19:02:22 2013 (r250608) +++ head/sys/dev/ath/if_ath.c Mon May 13 19:03:12 2013 (r250609) @@ -6028,7 +6028,7 @@ ath_node_set_tim(struct ieee80211_node * an->an_tim_set = 1; ATH_TX_UNLOCK(sc); changed = avp->av_set_tim(ni, enable); - } else if (atomic_load_acq_int(&an->an_swq_depth) == 0) { + } else if (an->an_swq_depth == 0) { /* disable */ DPRINTF(sc, ATH_DEBUG_NODE_PWRSAVE, "%s: an=%p, enable=%d, an_swq_depth == 0, disabling\n", @@ -6120,16 +6120,9 @@ ath_tx_update_tim(struct ath_softc *sc, ATH_TX_LOCK_ASSERT(sc); if (enable) { - /* - * Don't bother grabbing the lock unless the queue is not - * empty. - */ - if (atomic_load_acq_int(&an->an_swq_depth) == 0) - return; - if (an->an_is_powersave && an->an_tim_set == 0 && - atomic_load_acq_int(&an->an_swq_depth) != 0) { + an->an_swq_depth != 0) { DPRINTF(sc, ATH_DEBUG_NODE_PWRSAVE, "%s: an=%p, swq_depth>0, tim_set=0, set!\n", __func__, an); @@ -6140,13 +6133,13 @@ ath_tx_update_tim(struct ath_softc *sc, /* * Don't bother grabbing the lock unless the queue is empty. */ - if (atomic_load_acq_int(&an->an_swq_depth) != 0) + if (&an->an_swq_depth != 0) return; if (an->an_is_powersave && an->an_stack_psq == 0 && an->an_tim_set == 1 && - atomic_load_acq_int(&an->an_swq_depth) == 0) { + an->an_swq_depth == 0) { DPRINTF(sc, ATH_DEBUG_NODE_PWRSAVE, "%s: an=%p, swq_depth=0, tim_set=1, psq_set=0," " clear!\n", Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Mon May 13 19:02:22 2013 (r250608) +++ head/sys/dev/ath/if_athvar.h Mon May 13 19:03:12 2013 (r250609) @@ -415,17 +415,17 @@ struct ath_txq { #define ATH_TID_INSERT_HEAD(_tq, _elm, _field) do { \ TAILQ_INSERT_HEAD(&(_tq)->tid_q, (_elm), _field); \ (_tq)->axq_depth++; \ - atomic_add_rel_32( &((_tq)->an)->an_swq_depth, 1); \ + (_tq)->an->an_swq_depth++; \ } while (0) #define ATH_TID_INSERT_TAIL(_tq, _elm, _field) do { \ TAILQ_INSERT_TAIL(&(_tq)->tid_q, (_elm), _field); \ (_tq)->axq_depth++; \ - atomic_add_rel_32( &((_tq)->an)->an_swq_depth, 1); \ + (_tq)->an->an_swq_depth++; \ } while (0) #define ATH_TID_REMOVE(_tq, _elm, _field) do { \ TAILQ_REMOVE(&(_tq)->tid_q, _elm, _field); \ (_tq)->axq_depth--; \ - atomic_subtract_rel_32( &((_tq)->an)->an_swq_depth, 1); \ + (_tq)->an->an_swq_depth--; \ } while (0) #define ATH_TID_FIRST(_tq) TAILQ_FIRST(&(_tq)->tid_q) #define ATH_TID_LAST(_tq, _field) TAILQ_LAST(&(_tq)->tid_q, _field) @@ -436,17 +436,17 @@ struct ath_txq { #define ATH_TID_FILT_INSERT_HEAD(_tq, _elm, _field) do { \ TAILQ_INSERT_HEAD(&(_tq)->filtq.tid_q, (_elm), _field); \ (_tq)->axq_depth++; \ - atomic_add_rel_32( &((_tq)->an)->an_swq_depth, 1); \ + (_tq)->an->an_swq_depth++; \ } while (0) #define ATH_TID_FILT_INSERT_TAIL(_tq, _elm, _field) do { \ TAILQ_INSERT_TAIL(&(_tq)->filtq.tid_q, (_elm), _field); \ (_tq)->axq_depth++; \ - atomic_add_rel_32( &((_tq)->an)->an_swq_depth, 1); \ + (_tq)->an->an_swq_depth++; \ } while (0) #define ATH_TID_FILT_REMOVE(_tq, _elm, _field) do { \ TAILQ_REMOVE(&(_tq)->filtq.tid_q, _elm, _field); \ (_tq)->axq_depth--; \ - atomic_subtract_rel_32( &((_tq)->an)->an_swq_depth, 1); \ + (_tq)->an->an_swq_depth--; \ } while (0) #define ATH_TID_FILT_FIRST(_tq) TAILQ_FIRST(&(_tq)->filtq.tid_q) #define ATH_TID_FILT_LAST(_tq, _field) TAILQ_LAST(&(_tq)->filtq.tid_q,_field) _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"