cvs commit: src/sys/dev/em if_em.c if_em.h
Andrew Gallatin
gallatin at cs.duke.edu
Thu Jan 12 12:21:43 PST 2006
Scott Long [scottl at 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
More information about the cvs-all
mailing list