Date: Thu, 12 Jan 2006 15:21:19 -0500 From: Andrew Gallatin <gallatin@cs.duke.edu> To: Scott Long <scottl@FreeBSD.org> Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/em if_em.c if_em.h Message-ID: <20060112152119.A6776@grasshopper.cs.duke.edu> In-Reply-To: <200601110030.k0B0UPOx009098@repoman.freebsd.org>; from scottl@FreeBSD.org on Wed, Jan 11, 2006 at 12:30:25AM %2B0000 References: <200601110030.k0B0UPOx009098@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Scott Long [scottl@FreeBSD.org] wrote: > scottl 2006-01-11 00:30:25 UTC > > FreeBSD src repository > > Modified files: > sys/dev/em if_em.c if_em.h > Log: > Significant performance improvements for the if_em driver: Very cool. > - If possible, use a fast interupt handler instead of an ithread handler. Use > the interrupt handler to check and squelch the interrupt, then schedule a > taskqueue to do the actual work. This has three benefits: > - Eliminates the 'interrupt aliasing' problem found in many chipsets by > allowing the driver to mask the interrupt in the NIC instead of the > OS masking the interrupt in the APIC. Neat. Just like Windows.. <....> > - Don't hold the driver lock in the RX handler. The handler and all data > associated is effectively serialized already. This eliminates the cost of > dropping and reaquiring the lock for every receieved packet. The result > is much lower contention for the driver lock, resulting in lower CPU usage > and lower latency for interactive workloads. This seems orthogonal to using a fastintr/taskqueue, or am I missing something? Assuming a system where interrupt aliasing is not a problem, how much does using a fastintr/taskqueue change interrupt latency as compared to using an ithread? I would (naively) assume that using an ithread would be faster & cheaper. Or is disabling/enabling interrupts in the apic really expensive? Do you have a feel for how much of the increase was do to the other changes (rx lock, avoiding register reads)? Drew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060112152119.A6776>