From owner-freebsd-current@FreeBSD.ORG Fri Nov 12 00:02:05 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 91B7316A4D0 for ; Fri, 12 Nov 2004 00:02:05 +0000 (GMT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.191]) by mx1.FreeBSD.org (Postfix) with ESMTP id 262BE43D53 for ; Fri, 12 Nov 2004 00:02:05 +0000 (GMT) (envelope-from se@freebsd.org) Received: from [212.227.126.155] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1CSOtA-0002ii-00 for current@freebsd.org; Fri, 12 Nov 2004 01:02:04 +0100 Received: from [80.132.239.87] (helo=Gatekeeper.FreeBSD.org) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1CSOtA-0004Ej-00; Fri, 12 Nov 2004 01:02:04 +0100 Received: from StefanEsser.FreeBSD.org (StefanEsser [192.168.0.10]) by Gatekeeper.FreeBSD.org (Postfix) with ESMTP id 0A7DB5F4B; Fri, 12 Nov 2004 01:02:01 +0100 (CET) Received: by StefanEsser.FreeBSD.org (Postfix, from userid 200) id 43EDB2309; Fri, 12 Nov 2004 01:02:01 +0100 (CET) Date: Fri, 12 Nov 2004 01:02:01 +0100 From: Stefan =?iso-8859-1?Q?E=DFer?= To: current@freebsd.org Message-ID: <20041112000201.GB17103@StefanEsser.FreeBSD.org> Mail-Followup-To: Stefan =?iso-8859-1?Q?E=DFer?= , current@freebsd.org References: <20041111015242.GC33869@squash.dsto.defence.gov.au> <20041111220124.GA17103@StefanEsser.FreeBSD.org> <20041111230830.GB40059@squash.dsto.defence.gov.au> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20041111230830.GB40059@squash.dsto.defence.gov.au> User-Agent: Mutt/1.5.6i Content-Transfer-Encoding: quoted-printable X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:fa3fae9b6ca38d745862a668565919f6 Subject: Re: tunning PCI latency ... X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Nov 2004 00:02:05 -0000 On 2004-11-12 09:38 +1030, "Wilkinson, Alex" 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" 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