From owner-freebsd-stable@FreeBSD.ORG Sun Feb 25 16:11:33 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 24A7316A40E for ; Sun, 25 Feb 2007 16:11:33 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from smtp.vangyzen.net (static-74-41-215-198.dr01.brvl.mn.frontiernet.net [74.41.215.198]) by mx1.freebsd.org (Postfix) with ESMTP id DEDAC13C4C6 for ; Sun, 25 Feb 2007 16:11:32 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from [10.1.1.2] (fenchurch.vangyzen.net [10.1.1.2]) by smtp.vangyzen.net (Postfix) with ESMTP id A262E22836; Sun, 25 Feb 2007 10:11:31 -0600 (CST) Message-ID: <45E1B533.9090800@vangyzen.net> Date: Sun, 25 Feb 2007 10:11:31 -0600 From: Eric van Gyzen User-Agent: Thunderbird 1.5.0.7 (X11/20061027) MIME-Version: 1.0 To: Sam Leffler References: <45DA59DA.3040408@vangyzen.net> <45DB2D3E.5060803@errno.com> In-Reply-To: <45DB2D3E.5060803@errno.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-stable@freebsd.org Subject: Re: ath(4) irq and taskq cpu usage X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Feb 2007 16:11:33 -0000 Sam Leffler wrote: > Eric van Gyzen wrote: >> The irq and taskq for my ath(4) card often use excessive amounts of CPU >> time, even when my network is idle. They are often above 10% and 15%, >> respectively; occasionally, they are as high as 27% and 44%. >> >> The system is an AMD Athlon64 2800+ running FreeBSD 6.2-RELEASE i386 >> with a custom kernel including the wlan_* stuff, ath, ath_hal, and >> ath_rate_sample. It is a station using WPA2-PSK with AES-CCMP. The >> access point is also a FreeBSD machine with an ath(4) card. >> >> During periods of high CPU usage, the >> >> rx failed 'cuz of PHY err >> OFDM timing >> >> fields of the athstats output are increasing rather quickly. For >> example, while CPU usage was 25% and 46%, the OFDM timing field was >> increasing by 43,000 per second. >> >> Can anyone explain this? Is it a sign of failing hardware? > > It means you're seeing lots of noise in the environment. The numbers > you cite are way too high (43K/sec is crazy) and the %cpu times see too > high for your processor but that's hard to evaluate. You don't indicate > what your h/w is (mac+phy) revs but presumably it's old enough that PHY > errors are not counted in h/w but instead sent to the host as little > packets that must be processed. If you actually use the radio you'll > see the error counts go down because the radio will be busy doing useful > work. ath_hal: 0.9.17.2 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413) ath0: mem 0xea100000-0xea10ffff irq 17 at device 9.0 on pci0 ath0: Ethernet address: 00:11:95:91:32:f4 ath0: mac 7.9 phy 4.5 radio 5.6 I also have a P3 1.0 GHz laptop running FreeBSD 6.2 with a CardBus ath card with the same hardware revisions and configuration. When ath CPU usage is high on the desktop, it's perfectly normal on the laptop (below 2%), even when the two are only a meter apart. The CPU usage on the AP is also normal. The desktop and AP have D-Link DWL-G520 cards; the laptop has a Netgear WG511T. > High phy error rates can also be caused by things like faulty antenna > connections and/or radio overload (i.e. sta and ap being too close > and/or using high power radios). I put a different antenna on the desktop, with no change. The STA and AP are about ten meters apart. > I can add a knob to the driver to turn off this stuff but then you will > likely see degraded performance as the PHY errors are used to tune the > baseband when there is noise and/or when the case temperature changes > (this can significantly affect radio operation). I wouldn't ask you to do that, but thanks for offering. I should also mention that the desktop occasionally reboots spontaneously, as if I had hit the reset button. In particular, I wonder if the ath card is flaking out. The wild CPU usage and spontaneous resets /might/ have started around the same time, but I might be hallucinating. Thanks for your help and education...and for writing the driver in the first place. Eric