From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 19 03:39:08 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 508AF106568C for ; Wed, 19 Aug 2009 03:39:08 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id 9EC018FC16 for ; Wed, 19 Aug 2009 03:39:07 +0000 (UTC) Received: from inchoate.gsoft.com.au (inchoate.gsoft.com.au [203.31.81.30]) (authenticated bits=0) by cain.gsoft.com.au (8.13.8/8.13.8) with ESMTP id n7J3NWRj069963 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 19 Aug 2009 12:53:33 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Wed, 19 Aug 2009 12:53:20 +0930 User-Agent: KMail/1.9.10 MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3105456.LXgneOTOXJ"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200908191253.27951.doconnor@gsoft.com.au> X-Spam-Score: -3.601 () ALL_TRUSTED,AWL,BAYES_00 X-Scanned-By: MIMEDefang 2.63 on 203.31.81.10 Subject: PCI IRQ latency X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Aug 2009 03:39:08 -0000 --nextPart3105456.LXgneOTOXJ Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, We have a custom PCI (slave only, very slow) card to do data transfer,=20 and on some systems we are seeing problems with the data source FIFO=20 filling up. The data rate is 1.7Mb/sec and the FIFO is 96k in size, however it only=20 generates an IRQ when it has 16k of data in it, so it should have=20 ~4.5msec of buffer available once an IRQ is issued. The systems are Supermicro C2SBA+ with Core 2 Duos of varying speeds=20 (~1.5GHz) running FreeBSD 6.2 amd64. The kernel conf is basically=20 GENERIC, although I have also tried compiling out SMP but the problem=20 still persists. The card is not sharing an IRQ with any other card I can see (it has irq=20 20 and nothing else uses that). Due to the legacy nature of the card the interrupt handler for it is=20 pretty horrible - it reads 16k worth of data out 32 bits at a time=20 doing slave transactions. I can't do bursting because it is reading=20 from a FIFO, and due to the speed of the FIFO & cable runs each read=20 takes several PCI cycles. I did some googling and found=20 http://www.mail-archive.com/freebsd-usb%40freebsd.org/msg04576.html=20 which would seem to indicate we would be OK. Unfortunately it seems that _something_ blocks interrupts for >4=20 milliseconds, however I have no real idea how to go about finding what=20 it is.. Does anyone have any suggestions? (apart from get a new DAQ=20 card, I know this one already :) Thanks. =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart3105456.LXgneOTOXJ Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iD8DBQBKi3Av5ZPcIHs/zowRAjMtAKCYT3Nc9HbO9qQudeDhAh59psI0rgCeP1k+ x2gMEz8wadGi58ji/d1/ZQE= =PVT5 -----END PGP SIGNATURE----- --nextPart3105456.LXgneOTOXJ--