From owner-freebsd-current@freebsd.org Mon Sep 14 23:41:14 2020 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3CBE13E541D for ; Mon, 14 Sep 2020 23:41:14 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-oi1-x242.google.com (mail-oi1-x242.google.com [IPv6:2607:f8b0:4864:20::242]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Br2td35RXz4T40; Mon, 14 Sep 2020 23:41:13 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: by mail-oi1-x242.google.com with SMTP id c13so1770163oiy.6; Mon, 14 Sep 2020 16:41:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KHg/l4LzgXgj5p+beyiz/JVDuoQKU1yTEwXmOhO3zXo=; b=dmf+xVIzdb2fhAJb5+d5GaAOs0tgOeaM5T81C/t3egjPSM7+OFPn36WEJl0UA5IpRV cxLf8U07gT0uTnHdz1clJ7xrRgCpEi42Kl4jZq64ZIf11uIKKczVPJ6egiwYDWeGx1vQ kQ1LG1B4PlqZ66h9uSI1/n7GK1iK9JDpVvSyklCgb8AE9iukw8qaum4YcittEBd1QXFV lZdxJVxafjhej+kYprggXTEuR/xKg9KUXlGt2yk2vnD6kuk/HGXWZGoxl0M0VVNk4fzv twd5J4PuYWIsY1txMZXoRwDUH5XvdQSAWWYTm9V2W0fh0DF5guWBSAE4Uz8oi7xwVqI6 WTCw== X-Gm-Message-State: AOAM532PYKANGUEmvjDbayaTojQFRvynl+ySEpnCj26T7wfUMo0i/DE7 9WYcPW24cZThbKUk5SUorLG6tECNlg6fZZXTd8iVVak3hOE= X-Google-Smtp-Source: ABdhPJwabGtr5ulgome5nUIVzfDUPftYIU6L2MqRO7VFvyD+Ag9X4Soe/yXVhpRBXdNECmsk8q0GRx33igt2fwM8uO4= X-Received: by 2002:aca:48cc:: with SMTP id v195mr1324141oia.57.1600126872447; Mon, 14 Sep 2020 16:41:12 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Kevin Oberman Date: Mon, 14 Sep 2020 16:40:56 -0700 Message-ID: Subject: Re: Panic with wifi + usb in latest FreeBSD-current To: Adrian Chadd Cc: Warner Losh , FreeBSD Current , Hans Petter Selasky , "Bjoern A. Zeeb" X-Rspamd-Queue-Id: 4Br2td35RXz4T40 X-Spamd-Bar: - X-Spamd-Result: default: False [-1.17 / 15.00]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; RCPT_COUNT_FIVE(0.00)[5]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.05)[-0.052]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[rkoberman@gmail.com,kob6558@gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[rkoberman@gmail.com,kob6558@gmail.com]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.93)[-0.929]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.99)[-0.986]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::242:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; SUSPICIOUS_RECIPS(1.50)[]; MAILMAN_DEST(0.00)[freebsd-current] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Sep 2020 23:41:14 -0000 Small correction... My rtwn is running at 1 MB, not Mb. I have two tools watching the network, one does bits and the other bytes. Still, performance is really bad. Can't say whether it's the driver or something else, but I'll be gathering data as I can between reboots of my current system. Sorry for the bogus information. -- Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: rkoberman@gmail.com PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683 On Mon, Sep 14, 2020 at 9:52 AM Kevin Oberman wrote: > On Sun, Sep 13, 2020 at 11:31 PM Adrian Chadd > wrote: > >> On Sun, 13 Sep 2020 at 22:34, Warner Losh wrote: >> >> > >> > >> > On Sun, Sep 13, 2020, 11:29 PM Adrian Chadd >> > wrote: >> > >> >> Yeah, this was also reported in #freebsd-wireless today. >> >> >> >> Is there a lock being held in the rtwn path that shouldn't be? >> >> >> > >> > I'll check in the morning... this was like the 20th thing to go wrong >> this >> > weekend, so I copied the panic down, send the email and grabbed a beer >> and >> > turned it off... >> > >> >> Ok. I checked the driver and the usb stack; nothing in the change lists >> obviously stands out to me at 11pm on a Sunday. >> >> Can you see if any locks are held? or an epoch? Something smells fishy. >> (defining EPOCH_TRACE will dump the list of epochs, if I'm reading the >> subr_sleepqueue.c code correctly.) >> >> Ok, so, since I dug a bit more on a hunch, I bet the NET epoch is being >> held - it's grabbed in rtwn_bulk_rx_callback, and rtwn_rx_common is >> reading >> some registers as part of processing the receive queue. I bet that act of >> reading registers over blocking USB is causing things to explode. >> >> If it is net epoch then we're going to have to think of a better design >> pattern here to migrate all of these here wifi drivers to, because I >> guarantee you they're all behaving poorly in this newer world order. >> >> >> >> Thanks, >> >> >> -adrian >> > While I have not seen panics, performance of my rtwn has simply cratered. > Trying to move files to my new laptop, which has an rtwn, it crawls at > about 1.5 Mbps. Before I built an updated kernel, I was seeing 60M. Of > course, this is complicated by the continual kernel lockups I keep getting, > so I really didn't think much about it until I saw Warner's note. > -- > Kevin Oberman, Part time kid herder and retired Network Engineer > E-mail: rkoberman@gmail.com > PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683 > >