From owner-svn-src-head@freebsd.org Thu Sep 17 07:43:24 2015 Return-Path: Delivered-To: svn-src-head@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 4FBF19CE394; Thu, 17 Sep 2015 07:43:24 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x235.google.com (mail-ig0-x235.google.com [IPv6:2607:f8b0:4001:c05::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 19D1012D9; Thu, 17 Sep 2015 07:43:24 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igxx6 with SMTP id x6so8516138igx.1; Thu, 17 Sep 2015 00:43:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=yMimR/kZJ4Yy+Z1dIHe7xqEirjYhwT9jRzkCE3PjcCA=; b=a3m2tyyL7PxM4lRl9VANzqJVzIRg8kSrsK2XJZ2r2Q06E68v5IUD7EyZzWIHrkMXUj 7ueM43P9B3n/no5qEHYFuFTzMUayREYXEKmB5BhdrQQ3kN2JgioYjtooC75cTW+z58YC tIzlrPSOLJn/VheRRCdf2cnbbtuvG/Coz59ih7A2zr+Ji63LOl54OJ9GFVdEgkWHHQi/ gqNss5g8UPxy+00QniXNoZj7e0aJzQPUPbOMC/eMBk58PCKQdxLlaF87/7+DOurf/Wg4 y4bvLew/e+JBcowh34g0D58oHyP3X3klN16SL6B+6HHMFti07WxSiIML1eiqXrD+Zo+M vh0Q== MIME-Version: 1.0 X-Received: by 10.50.1.44 with SMTP id 12mr21921325igj.61.1442475803344; Thu, 17 Sep 2015 00:43:23 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.28.208 with HTTP; Thu, 17 Sep 2015 00:43:23 -0700 (PDT) In-Reply-To: <55FA6EA2.8050809@selasky.org> References: <201509170301.t8H31KdP042687@repo.freebsd.org> <55FA6C62.6010705@selasky.org> <55FA6EA2.8050809@selasky.org> Date: Thu, 17 Sep 2015 00:43:23 -0700 X-Google-Sender-Auth: jMEx-EZK3X-hIDEWu6V5CpN_Dsc Message-ID: Subject: Re: svn commit: r287892 - head/sys/dev/usb/wlan From: Adrian Chadd To: Hans Petter Selasky Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list 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: Thu, 17 Sep 2015 07:43:24 -0000 .. I'm likely going to do exactly that as part of "making" if_rsu do 11n and behave correctly. Right now it does neither. But this is a pretty big design pattern flaw; all of the wifi drivers use the usb library like this and .. well, unless you look under the hood, you don't really realise that serialiser lock is being dropped for you... :( -a On 17 September 2015 at 00:41, Hans Petter Selasky wrote: > On 09/17/15 09:31, Hans Petter Selasky wrote: >> >> On 09/17/15 05:01, Adrian Chadd wrote: >>> >>> Author: adrian >>> Date: Thu Sep 17 03:01:19 2015 >>> New Revision: 287892 >>> URL: https://svnweb.freebsd.org/changeset/base/287892 >>> >>> Log: >>> Use DELAY() rather than usb_pause_mtx() - the latter releases the lock >>> before waiting, which prevents the lock from really acting like >>> a hardware serialiser. Sigh. >>> >>> Modified: >>> head/sys/dev/usb/wlan/if_rsu.c >>> >> >> This cause a lot more CPU to be burnt. Is there no other way to fix >> this? Using an SX lock? >> >> --HPS >> > > This will not help anything, because at every control request the same lock > is dropped again. You need to add an SX lock there, and should revert this > pause->DELAY change :-( > > --HPS >