SMPable version of EM driver

Bruce Evans brde at optusnet.com.au
Tue Oct 2 18:48:38 PDT 2007


On Tue, 2 Oct 2007, Vladimir Ivanov wrote:

> Main improvement of this version: driver does not use TX interrupts at all. 
> So, interrupt rate reduced significantly.

Polling for anything is a bug IMO.  Buggy hardware may work better with it,
but em is not buggy :-).

For bge, I tune the interrupt moderation parameters to reduce the tx
interrupt rate to almost as low as possible without doing polling.
The rate is either 1 interrupt per second if the tx is almost inactive
or 1 interrupt every 384 packets if the tx is active.  -current mistunes
these parameters to 150 (microseconds) and 10 (descriptos).  Old tuning
of 150 and 128 only loses a little compared with 1000000 and 384.  (150
gives 6667 interrupts per second under load.  This interrupt rate is
quite manageable and is about the same rate as you have to use with
polling to get the same throughput but lower efficiency as with
interrupts.  128 for the descriptor limit causes in a max interrupt rate
of only a few hundred per second except with tiny packets, but 10 is
excessively small and requires a rate of up to 140000 per second to keep
up with tiny packets.  140000 isn't manageable.)

em has more/better interrupt parameters with non-broken defaults so I haven't
needed to tune them.  For bge, I implement dynamic rx interrupt moderation
in software where em has it in hardware.  10000 interrupts/second for rx
is a good limit.  IIRC, em uses 8000 which is a bit low for a max, and
is missing a sysctl for easy tuning.

Bruce


More information about the freebsd-net mailing list