From owner-freebsd-alpha Sun Jun 3 17:10: 6 2001 Delivered-To: freebsd-alpha@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 63B2637B406 for ; Sun, 3 Jun 2001 17:10:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.3/8.11.3) id f540A1K99595; Sun, 3 Jun 2001 17:10:01 -0700 (PDT) (envelope-from gnats) Received: from netau1.alcanet.com.au (ntp.alcanet.com.au [203.62.196.27]) by hub.freebsd.org (Postfix) with ESMTP id B4F7E37B401 for ; Sun, 3 Jun 2001 17:00:49 -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 KAA16353 for ; Mon, 4 Jun 2001 10:00:47 +1000 (EST) Received: from gsmx07.alcatel.com.au by cim.alcatel.com.au (PMDF V5.2-32 #37640) with ESMTP id <01K4D5E41K28VLKOJ3@cim.alcatel.com.au> for FreeBSD-gnats-submit@freebsd.org; Mon, 4 Jun 2001 10:00:29 +1000 Received: (from jeremyp@localhost) by gsmx07.alcatel.com.au (8.11.1/8.11.1) id f5400PU71784; Mon, 04 Jun 2001 10:00:25 +1000 (EST envelope-from jeremyp) Message-Id: <200106040000.f5400PU71784@gsmx07.alcatel.com.au> Date: Mon, 04 Jun 2001 10:00:25 +1000 (EST) From: peter.jeremy@alcatel.com.au Reply-To: peter.jeremy@alcatel.com.au To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: alpha/27866: Fast interrupts handled via interrupt threads 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 >Number: 27866 >Category: alpha >Synopsis: Fast interrupts handled via interrupt threads >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-alpha >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Jun 03 17:10:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Peter Jeremy >Release: FreeBSD 5.0-CURRENT alpha >Organization: Alcatel Australia Limited >Environment: 5.0-CURRENT from around 25th May >Description: `Fast' interrupts can be handled synchronously by calling the bus and device interrupt handler directly from /sys/alpha/alpha/interrupt.c:alpha_dispatch_intr(), whereas other interrupts are scheduled as interrupt threads. Unfortunately, the test for fast interrupts in interrupt.c incorrectly uses INTR_FAST instead of IH_FAST, so fast interrupts aren't detected. This significantly increases latencies for fast interrupts and can lead to SILO overflows. This was detected by some code I added to determine what was contributing to sio interrupt latencies. I discovered that the `fast interrupt found' probe was not being triggered. >How-To-Repeat: Code inspection: If alpha_setup_intr() is called with INTR_FAST specified in , this will be passed onto ithread_add_handler() where it will be mapped to (IH_FAST | IH_EXCLUSIVE) in (struct intrhand).ih_flags. When the interrupt occurs, alpha_dispatch_intr() tests (struct intrhand).ih_flags against INTR_FAST and so fails to detect that it is a fast interrupt. >Fix: [This fix has been tested on my Multia, but the following is a re-type of the fix] Index: interrupt.c =================================================================== RCS file: /home/CVSROOT/src/sys/alpha/alpha/interrupt.c,v retrieving revision 1.52 diff -u -r1.52 interrupt.c --- interrupt.c 2001/05/15 23:22:17 1.52 +++ interrupt.c 2001/06/03 23:41:17 @@ -434,7 +434,7 @@ * that this means that any fast interrupt handler must be MP safe. */ ih = TAILQ_FIRST(&ithd->it_handlers); - if ((ih->ih_flags & INTR_FAST) != 0) { + if ((ih->ih_flags & IH_FAST) != 0) { ih->ih_handler(ih->ih_argument); return; } >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message