From owner-freebsd-alpha Wed May 30 16:35: 7 2001 Delivered-To: freebsd-alpha@freebsd.org Received: from netau1.alcanet.com.au (ntp.alcanet.com.au [203.62.196.27]) by hub.freebsd.org (Postfix) with ESMTP id B235A37B424 for ; Wed, 30 May 2001 16:35:03 -0700 (PDT) (envelope-from jeremyp@gsmx07.alcatel.com.au) Received: from mfg1.cim.alcatel.com.au (mfg1.cim.alcatel.com.au [139.188.23.1]) by netau1.alcanet.com.au (8.9.3 (PHNE_22672)/8.9.3) with ESMTP id JAA16432 for ; Thu, 31 May 2001 09:34:58 +1000 (EST) Received: from gsmx07.alcatel.com.au by cim.alcatel.com.au (PMDF V5.2-32 #37641) with ESMTP id <01K47JBZ7PMOVF97T4@cim.alcatel.com.au> for freebsd-alpha@freebsd.org; Thu, 31 May 2001 09:34:51 +1000 Received: (from jeremyp@localhost) by gsmx07.alcatel.com.au (8.11.1/8.11.1) id f4UNYsM24672 for freebsd-alpha@freebsd.org; Thu, 31 May 2001 09:34:54 +1000 (EST envelope-from jeremyp) Content-return: prohibited Date: Thu, 31 May 2001 09:34:54 +1000 From: Peter Jeremy Subject: Abyssmal interrupt latency with -current To: freebsd-alpha@freebsd.org Mail-Followup-To: freebsd-alpha@freebsd.org Message-id: <20010531093454.X89950@gsmx07.alcatel.com.au> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org I've recently been getting SILO overflows on the PPP link on my Multia. I recall seeing a comment (probably in -current) about interrupt latency regressions, but the Multia seems worse than my 486, so I suspect some of it is alpha-specific. As a comparison, my 386SX-25 running 2.2.5 can run PPP at 38.4kbps without SILO overflows using a 16450 UART. My Multia running -current gets SILO overflows at 38.4kbps with a 16550A set to interrupt at 8 bytes (even after I disable WITNESS and INVARIANTS). This is an order of magnitude worse performance. To try and get a handle on the problem, I added code to read and save the PCC at the start of XentInt() [this is as close as I can get to when the interrupt was raised], siointr() [this is when the interrupt is delivered to the device's interrupt handler] and siointr1() [which is after the sio mutex is seized and close to when the received character is actually read]. The code is not yet perfect, but I'm reasonably confident about the accuracy of my results. (These figures are for a UP kernel from late last week without WITNESS or INVARIANTS). The median time from entering XentInt to the start of the sio interrupt handler is 61usec. This should be similar for any interrupt handler. I suspect the brain-dead memory interface on the LCA is a significant factor in this. This also implies that the clock interrupt overhead is 15-20% of CPU time - I might try to configure a real stats clock interrupt and see if I can get accurate figures. Once control actually gets to siointr, grabbing the sio mutex takes another 2.7usec (median) - again quite high. Whilst these figures are very high, they would be survivable if it wasn't for the figures to the right of the median... The mean time between XentInt and siointr1() is 223usec. In my sample of 1650 serial interrupts over 4.8 seconds, there are 3 outliers at ~55msec and another 2 at ~7msec. In all, nearly 1% of the samples have a latency exceeding 2msec. (My samples show that multiple clock interrupts occur between when the serial interrupt is received in XentInt() and when it gets handled in siointr1()). It's possible that some of these samples are glitches in my collection code, but the existence of SILO overruns means that the latency can exceed ~2msec. Does anyone have any ideas what could be leading to such ludicrous interrupt latencies? Overall, I suspect I'd be better off ignoring all interrupts except the clock interrupt and polling everything everything else from within the clock interrupt. Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message