Date: Fri, 12 Nov 2004 01:02:01 +0100 From: Stefan =?iso-8859-1?Q?E=DFer?= <se@FreeBSD.org> To: current@freebsd.org Subject: Re: tunning PCI latency ... Message-ID: <20041112000201.GB17103@StefanEsser.FreeBSD.org> In-Reply-To: <20041111230830.GB40059@squash.dsto.defence.gov.au> References: <20041111015242.GC33869@squash.dsto.defence.gov.au> <20041111220124.GA17103@StefanEsser.FreeBSD.org> <20041111230830.GB40059@squash.dsto.defence.gov.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2004-11-12 09:38 +1030, "Wilkinson, Alex" <alex.wilkinson@dsto.defence= .gov.au> wrote: > 0n Thu, Nov 11, 2004 at 11:01:24PM +0100, Stefan E=DFer wrote:=20 >=20 > On 2004-11-11 12:22 +1030, "Wilkinson, Alex" <alex.wilkinson@dsto.defe= nce.gov.au> wrote: > > Hi all, > >=20 > > Is it possible to change the latency of PCI devs in RELENG_5 ? > > i.e in the same respect it can be done in Linux with setpci(8). > =09 > What do you try to achieve? >=20 > I wanted to experiment with changing the amount of time PCI devices wer= e allocated > to burst data across the bus and the effects of doing so. Hmmm, you are aware that the latency timer value is irrelevant unless there are multiple competing bus-masters? It is not a time slice assigned to a device, but the minimum time slice that the device gets granted in case of competition (i.e. once it gets to use the bus, a higher priority master will have to at least let it have that many cycles). The master latency timer in the host bridge may have a lower value than the device latency timer, causing the latter to never trigger. The sum of all latency timers must be low enough to permit all possible bus-masters to access the bus before their internal fifo buffers overflow. That puts a maximum on the sum, which in theory depends on the maximum latency value reported by the device with the (in relation to its nominal effective transfer rate) smallest buffer. Lower values will just cause the bus to be given up early and will cause a higher fraction of address vs. data cycles. Normal latency timer values (in the range of 16 to 32 cycles) should get you 75% to 90% of the theoretical bandwidth, while the maximum latency for 2 or 3 competing bus masters is at most=20 2 micro seconds (less than 200bytes at Gigabit Ethernet data rates). I don't think that changing the latency timer is going to make any a difference, except under extremely high bus load ... Regards, STefan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041112000201.GB17103>