Date: Mon, 6 Feb 2006 05:03:02 +0000 (GMT) From: Nate Nielsen <nielsen-list@memberwebs.com> To: Sam Leffler <sam@errno.com> Cc: "freebsd-net@FreeBSD.org" <freebsd-net@freebsd.org> Subject: Re: Polling for ath driver Message-ID: <20060206050301.AC895DCAA3F@mail.npubs.com> References: <20060205011931.E5F08DCA99E@mail.npubs.com> <43E63FC3.2030409@errno.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Sam Leffler wrote: > You might try explaining why you think polling helps your performance. > Unless you've significantly restructured the interrupt handling in the > driver most work is deferred to a non-interrupt context. Yes, I saw that. However the interrupts themselves when they are fired at upwards of a thousand per second do greatly affect performance and scheduling on a slow box. I understand that it may not seem intuitive on faster systems which are completely capable of handling such a small interrupt load. But these embedded systems are slow little puppies, running between 133 and 266 Mhz (586 class chip). Adding polling to this driver does increase performance on embedded systems. With my current patch (on a 233Mhz system), the throughput (in this case a simple TCP stream) goes up by ~6Mbits, from 18Mbits to 24Mbits. But that's not the main benefit. The main thing is the scheduling. Without having the thousands of interrupts, the box is better able to balance the RX/TX with the other aspects, such as encapsulation, packet filtering and other activities. When the entire box is polling driven, it's total throughput (ethernet, encapsulation, hardware encryption, wireless) increases greatly and does not exhibit livelock symptoms. Without polling, these slow systems easily exhibit livelock. This is where incoming traffic can cause so many interrupts that outgoing traffic is completely halted and the throughput drops to zero or near zero. Under these conditions userland processes also run barely or not at all. The scheduler has no say in what's going on in the system, as interrupts overwhelm all other activity. > Also the > driver in 6.0 and later does tx interrupt mitigation and rx interrupt > coalescing so I wouldn't expect interrupt handling to be a performance > limitation. Interesting. If there's an option to enable it, I very well may have missed it. However it should be noted, that the default behaviour (in 6.0 release) seems to be that the hardware generates about around 2000 interrupts per second at around 15 - 18 Mbits throughput. > There are other issues that can affect performance but you > haven't mentioned them... Obviously these are not mainstream performance issues for people just trying to connect to an access point. But when the atheros cards are used in backhaul applications and are running in the low power embedded systems you typically see on an antenna mast, polling makes a big difference. Cheers, Nate
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060206050301.AC895DCAA3F>