Re: high max-latency times?

From: Martin Mares (mj@suse.cz)
Date: Thu May 18 2000 - 11:11:30 EST


Hello!

> Under 2.3.x, the pci_set_master/pci_enable_device functions often sets
> the latency higher than the "max latency" value. This sounds wrong...
> is it?

   The MAX_LAT register doesn't specify a maximum value of the latency
timer at all. As the PCI specs say, both MIN_GNT and MAX_LAT are specified
in 250ns units (as opposed to the latency timer which counts in PCI clocks)
and tell the OS that the card needs to access the bus for time MIN_GNT
every MAX_LAT, thus giving bounds for latency timers of not only the particular
devices, but all the other PCI (and even non-PCI) devices in the system.

   Proper calculation of latency timers is a very complex and arcane thing
which requires knowledge of bus speed, arbitration algorithm used by the
central bus arbiter, latencies of non-PCI devices in the system and so on.
I plan to write a user-space utility trying to guess all these parameters
and calculate the appropriate latencies, but I would like to keep it outside
the kernel unless unavoidable. (As DaveM has already mentioned, this already
very complex task is further complicated by many devices reporting invalid
MIN_GNT/MAX_LAT values...)

   The BIOS should set the latency timers to reasonable values and our
current code exists only to work around broken BIOSes which use bogus
values or broken chipsets which lock up the bus when a bus master holds
the bus too long.

                                Have a nice fortnight

-- 
Martin `MJ' Mares <mj@ucw.cz> <mj@suse.cz> http://atrey.karlin.mff.cuni.cz/~mj/
"Quote of the day: '"

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue May 23 2000 - 21:00:15 EST