From owner-freebsd-wireless@freebsd.org Sat Feb 20 19:40:37 2016 Return-Path: Delivered-To: freebsd-wireless@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1649CAAE3E7 for ; Sat, 20 Feb 2016 19:40:37 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from albert.catwhisker.org (mx.catwhisker.org [198.144.209.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD217D98 for ; Sat, 20 Feb 2016 19:40:35 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.15.2/8.15.2) with ESMTP id u1KJeYG7075471; Sat, 20 Feb 2016 19:40:34 GMT (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.15.2/8.15.2/Submit) id u1KJeXKN075470; Sat, 20 Feb 2016 11:40:33 -0800 (PST) (envelope-from david) Date: Sat, 20 Feb 2016 11:40:33 -0800 From: David Wolfskill To: Andriy Voskoboinyk Cc: "freebsd-wireless@freebsd.org" Subject: Re: software scan fix - please test (Was: why we can't use the net80211 taskqueue for everything) Message-ID: <20160220194033.GG65475@albert.catwhisker.org> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="oXNgvKVxGWJ0RPMJ" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.20 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: Sat, 20 Feb 2016 19:40:37 -0000 --oXNgvKVxGWJ0RPMJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Feb 20, 2016 at 12:06:17PM +0200, Andriy Voskoboinyk wrote: > > hi, > > > > andriy has a few reviews out that tidy up some things, which I'd reply > > to, but .. reviews is offline. So, here's the 30 second version: > > > > * the net80211 taskqueue runs the software scan engine, and the > > software scan engine currently sleeps whilst it's running. > > > > This means that if you put newstate, deferred transmit, etc into the > > net80211 taskqueue, then it just won't run during scan. > > > > The net80211 software scan thing should be modified to not sleep > > whilst it's waiting for scan results and instead just kick off another > > timer event to finish that part of the loop. Then yes, we can just > > migrate * to the net80211 task queue and use it for all serialisation > > of a wifi driver. > > > > (And yes, I'd like to see that done ASAP..) > > > > Thanks, > > > > > > -adrian >=20 > Hi, >=20 > I have replaced sleeping on conditional variable inside scan task > with scan_curchan task rescheduling (so this problem should be fixed now). >=20 > For everyone, who wishes to test: apply the attached patch > (merged from D5133, D5137, D5139, D5140, D5142, D5143, D5145, D5147, D514= 8 =20 > and D5152) > and rebuild + install the kernel. Scan should work as before. > .... OK; I tried it (details of environment & method below); so far, I'm not seeing a noticable difference in behavior. (That said: I normally run head only when I'm specifically testing something or -- rather more often -- when I'm doing a daily src upgrade in-place at home.) And usually, home doesn't present a problem -- it's work that does that (probably some timing issues with authentication catalyzing wpa_supplicant to blacklist successive APs as they're tried.) As for details: this was on my laptop, after "cloning" slice 4 (fresh-built head from this morning) to slice 3), then: Script started on Sat Feb 20 10:50:35 2016 command: svn patch /tmp/patch-net80211-scan-sw.diff /S3/usr/src U /S3/usr/src/sys/net80211/ieee80211_output.c U /S3/usr/src/sys/net80211/ieee80211_scan.c U /S3/usr/src/sys/net80211/ieee80211_scan_sw.c Script done on Sat Feb 20 10:50:35 2016 Script started on Sat Feb 20 10:50:35 2016 command: svn info /S3/usr/src Path: /S3/usr/src Working Copy Root Path: /S3/usr/src URL: file:///svn/freebsd/src/base/head Relative URL: ^/head Repository Root: file:///svn/freebsd/src/base Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f Revision: 295835 Node Kind: directory Schedule: normal Last Changed Author: skra Last Changed Rev: 295834 Last Changed Date: 2016-02-19 23:45:21 -0800 (Fri, 19 Feb 2016) Script done on Sat Feb 20 10:50:35 2016 Starting "uname -a" output: FreeBSD g1-252.catwhisker.org 11.0-CURRENT FreeBSD 11.0-CURRENT #339 r2958= 34M/295835:1100099: Sat Feb 20 04:51:08 PST 2016 root@g1-252.catwhisker= =2Eorg:/common/S4/obj/usr/src/sys/CANARY amd64 Ending "uname -a" output: FreeBSD g1-252.catwhisker.org 11.0-CURRENT FreeBSD 11.0-CURRENT #340 r2958= 34M/295835:1100099: Sat Feb 20 11:11:03 PST 2016 root@g1-252.catwhisker= =2Eorg:/common/S3/obj/usr/src/sys/CANARY amd64 > Thanks! Thank you! :-) Peace, david --=20 David H. Wolfskill david@catwhisker.org Those who would murder in the name of God or prophet are blasphemous coward= s. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --oXNgvKVxGWJ0RPMJ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJWyMExXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRDQ0I3Q0VGOTE3QTgwMUY0MzA2NEQ3N0Ix NTM5Q0M0MEEwNDlFRTE3AAoJEBU5zECgSe4XhVEH/ReRdiw4EC8PuodzDFN8ItQo U6YKw7+ohX/3utjzvfm0jlOyTonwrdgzck57RFaYhiSOnAc32cQt+CPptOnM+3Ll Gr0VNG11OfyZ2Gm0DKXCxcXgW+sWwVdXVe+xOO/7OtiC0hkOk30ab5S5RKJo/sug Ta2iTQSuKKYiw3ud7IM2JlpvYjEIvRqCLYjThcboqMRdr4chaq1wU0XoZzsEb06i MdMtKSNqyK7ZDSnmdQzAOC5Amxbcr0pt3h/4298uyNQECMqSjY+6xwU++ddApKNo 7SC351/nk/3Eb/rdA5zRD3AV7V6wY3cpIyG34qGEJJ2xAY03Cuzdp6cdvSyFJME= =RgtK -----END PGP SIGNATURE----- --oXNgvKVxGWJ0RPMJ--