ath(4) irq and taskq cpu usage
Eric van Gyzen
eric at vangyzen.net
Sun Feb 25 16:11:33 UTC 2007
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
ath_hal: 0.9.17.2 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)
ath0: <Atheros 5212> 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
More information about the freebsd-stable