Call for performance evaluation: net.isr.direct (fwd)

Bruce Evans bde at zeta.org.au
Fri Oct 14 16:46:39 PDT 2005


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


More information about the freebsd-net mailing list