Date: Sat, 15 Oct 2005 09:46:22 +1000 (EST) From: Bruce Evans <bde@zeta.org.au> To: Andrew Gallatin <gallatin@cs.duke.edu> Cc: Garrett Wollman <wollman@csail.mit.edu>, Poul-Henning Kamp <phk@phk.freebsd.dk>, net@freebsd.org Subject: Re: Call for performance evaluation: net.isr.direct (fwd) Message-ID: <20051015092141.F1403@epsplex.bde.org> In-Reply-To: <17231.50841.442047.622878@grasshopper.cs.duke.edu> References: <17231.43525.446450.161986@grasshopper.cs.duke.edu> <13600.1129298731@critter.freebsd.dk> <17231.50841.442047.622878@grasshopper.cs.duke.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 14 Oct 2005, Andrew Gallatin wrote: > Bear in mind that I have no clue about timekeeping. I got into this > just because I noticed using a TSC timecounter reduces context switch > latency by 40% or more on all the SMP platforms I have access to: > > 1.0GHz dual PIII : 50% reduction vs i8254 > 3.06GHz 1 HTT P4 : 55% vs ACPI-safe, 70% vs i8254) > 2.0GHz dual amd64: 43% vs ACPI-fast, 60% vs i8254) > > High context switch latency has been problem since FreeBSD 5 in > networking due to the context switches for netisr use, and for the > context switches required by interrupt threads. I'm sure it is a > problem in other parts of the system. I think it is pretty important, > and I'd really like to see it fixed. I'm not sure about that. More the reverse. Normal interrupts just don't occur often enough for their context switch time to matter. This is most clear for disk devices. Disk devices are relatively slow and have even slower seeks, so have to talk to them in large (~64K) blocks to get reasonable perfermonace and this results in not many transactions (except with especially braindamaged hardware that does something like interrupting for every 512-block). Network devices have a normal packet size of ~1500 bytes so they have to have interrupt moderation to reduce the interrupt load, and non-braindamaged ones do. However, for netisrs I think it is common to process only 1 packet per context switch, at least in the loopback case. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051015092141.F1403>