On Tue, Aug 17, 1999 at 02:13:13PM +0200, Pierre Brua wrote:

> Which problems arise with low latency values ? Is it just causing an
> unneeded overhead somewhere ?

If your latency timer is extremely low (eg. <10 in your example is a pretty
good test), you might be wasting a lot of bus cycles.  PCI devices can be
really fast primarily because they prefer to do things in "burst" transfers
-- that is, you tell it the target address once, and then you write lots of
data to consecutive memory locations.

If your device complies with the PCI spec (and that's a pretty big 'if')
then the latency timer on a device limits the length of the burst, so that
devices will share the bus better.  A device doesn't have to share until its
latency timer has expired _AND_ someone else wants to use the bus.

In the worse case, you set the latency timer to 0.  It can take up to 3 PCI
clocks to begin a transfer, and one more for the first data block (there's
always at least one!). That means 4 clocks for each 32-bit transfer.

The best (but almost unattainable) case is a really big latency timer, in
which case the setup time is negligible and you have as little as 1 PCI
clock per 32-bit transfer.

If you have astonishingly fast devices with stupidly small buffers (say,
1Gbit/sec and a 500 byte buffer) then you have to be careful when setting
the latency timer, or a buffer is likely to overflow and data will get lost. 

As a secondary goal, you want a large latency timer setting to maximize your
bus transfer speed.  32 (up to 128 bytes) or 64 (up to 256 bytes) is usually
plenty.

> Does a lower pci latency improve TCP_NO_DELAY packets latency
> significantly for network transfers (under MPI for example) ? In that
> case does it mean I should choose a card by checking the ones that have
> a lower latency hardcoded in their driver fi I want low MPI latency ?

Maybe by a few microseconds -- which means it doesn't matter.  The latency
timer is expressed in PCI clocks, which happen at 33MHz.  Reducing the
latency timer from 64 to 32 might decrease latency by as much as a
microsecond... but it might also slow down your transfers.

I hope this helps -- I once wrote a report on optimizing latency timer
values on a system (a videoconferencing/ATM switch) that actually needed it.

Have fun,

Avery

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to