From owner-freebsd-wireless@FreeBSD.ORG Fri Nov 30 10:25:06 2012 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1D3E0487 for ; Fri, 30 Nov 2012 10:25:06 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id A40008FC08 for ; Fri, 30 Nov 2012 10:25:05 +0000 (UTC) Received: by mail-we0-f182.google.com with SMTP id u54so113744wey.13 for ; Fri, 30 Nov 2012 02:25:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=QwesNXWQXMgBLLvnEmFWxMNY/yhKRU0jPafIbeXPmUU=; b=cGjG48nILfBiAzYKz6xCOQt7Z3OJ7kbXnEmx2FtHt3UqjBAnYfbPxRyDVuBTTqdYCT 15Mn6e38E5jyWTWb0u+VK63twPAhPvqz1DP0ofipd23Ne2ki+NIqc03ae5lOlghpenUX edV50/PwvNxsLQCalLCHkJQaLr92hocnLbDpIwLtW19xPQPzY2+TtTqVmxCa3dfxOFa/ mMKyjV29ddd2mGN2j02Am2sRBTMHNgsEdyZp1XEsK0HDWHyOPkt3S3V+pi2/xT862Bw1 ZjS/kbAmzbxWDvp7jqanhdVdouoD7mDGyyk/V/nsXzDWbbsxUQXFRr09lwrYpNUu5/xy TqlA== MIME-Version: 1.0 Received: by 10.216.139.140 with SMTP id c12mr324594wej.46.1354271104526; Fri, 30 Nov 2012 02:25:04 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.217.57.9 with HTTP; Fri, 30 Nov 2012 02:25:04 -0800 (PST) Date: Fri, 30 Nov 2012 02:25:04 -0800 X-Google-Sender-Auth: NIMSrYFO8SLagxixJ1AFjc9rSKM Message-ID: Subject: Please test - collapsing the TX locking down to ATH_TX_LOCK() From: Adrian Chadd To: freebsd-wireless@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Nov 2012 10:25:06 -0000 Hi all, This patch collapses all of the TXQ locking down to a single TX lock and (mostly correctly) wraps the TX outbound path in a single, giant lock. The TX completion path is still a patchwork of locking, primarily because _it_ needs to be able to free net80211 node references and that can't be done with the TX lock held (or all kinds of LORs occur.) Once this is done, I'll strip out the ATH_NODE lock (since it's now not really needed any longer) and I'll just do the whole TX and TX completion handling behind this TX lock. I can then undo some of the strange locking going on with the power save handling - then I can move onto implementing correctly behaving PS-POLL. Also, once this is done, I can start doing useful things, like shoehorning traffic from any TID to any hardware TXQ, rather than assuming a fixed mapping between TID and hardware TXQ. (Again, this will be useful for PS-POLL handling.) http://people.freebsd.org/~adrian/ath/20121129-ath-tx-lock-5.diff I'd appreciate it if people would test this out against the latest -HEAD and let me know if it breaks. Since it's just mostly a mechanical copy/paste, I'm only really worried if it causes crashes, hangs or LORs. There's one LOR that will get triggered if you send fragments, but as sending fragments is currently just plain broken, it won't show up. Thanks, Adrian