From owner-freebsd-net@FreeBSD.ORG Sat Apr 5 11:59:56 2003 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8BD9537B401; Sat, 5 Apr 2003 11:59:55 -0800 (PST) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2345443F85; Sat, 5 Apr 2003 11:59:55 -0800 (PST) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.12.9/8.12.9) with ESMTP id h35JxrMS029644 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sat, 5 Apr 2003 14:59:53 -0500 (EST) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.11.6/8.9.1) id h35JxmD38616; Sat, 5 Apr 2003 14:59:48 -0500 (EST) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16015.13748.503036.374679@grasshopper.cs.duke.edu> Date: Sat, 5 Apr 2003 14:59:48 -0500 (EST) To: Bruce Evans In-Reply-To: <20030405163141.T37137@gamplex.bde.org> References: <20030404094628.A59969@hub.freebsd.org> <20030405163141.T37137@gamplex.bde.org> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid cc: freebsd-net@freebsd.org Subject: Re: Disable/Enable Interrupts in ISR X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Apr 2003 19:59:56 -0000 Bruce Evans writes: > > Is there an issue on non-x86 architectures? > > Not AFAIK. Not far, but SMP and FreeBSD's ithread implementation need > something like an x86 ICU to work right. The interrupt mask must be > global, and per-cpu ipls don't (naturally) work right even in the 1-cpu > case since they are designed for masking interrupts in a nested way with > the CPU determining the prioritization, but ithreads are non-nested and > want their own prioritization. > > Bruce On 5.0 alpha, when an non-fast interrupt is dispatched, the device interrupt is disabled in the hardware. Eg, for PC like machines, interrupts are disabled/re-enabled each time an interrupt fires via isa_{en,dis}able_intr() in alpha/isa/isa.c. Other platforms have their own way of doing the same thing. In retrospect, this seems to be hideously expensive... In 4.x, there is no SMP on alpha and the IPL level is raised when a device interrupt handler is run, so that the handler can never be interrupted by the device itself. Drew