From owner-freebsd-arch@FreeBSD.ORG Thu May 1 08:31:52 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0BF2D37B401 for ; Thu, 1 May 2003 08:31:52 -0700 (PDT) Received: from mail.speakeasy.net (mail13.speakeasy.net [216.254.0.213]) by mx1.FreeBSD.org (Postfix) with ESMTP id CE78643FB1 for ; Thu, 1 May 2003 08:31:50 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 26669 invoked from network); 1 May 2003 15:31:53 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender )encrypted SMTP for ; 1 May 2003 15:31:53 -0000 Received: from laptop.baldwin.cx ([216.133.140.1]) by server.baldwin.cx (8.12.8/8.12.8) with ESMTP id h41FVlOv025832; Thu, 1 May 2003 11:31:48 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20030501151409.GD1869@survey.codeburst.net> Date: Thu, 01 May 2003 11:31:32 -0400 (EDT) From: John Baldwin To: Paul Richards cc: Andrew Gallatin cc: freebsd-arch@freebsd.org Subject: Re: lots of malloc(M_WAITOK)'s in interrupt context from camisr X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 May 2003 15:31:52 -0000 On 01-May-2003 Paul Richards wrote: > On Thu, May 01, 2003 at 04:31:08PM +1000, Bruce Evans wrote: >> On Wed, 30 Apr 2003, Andrew Gallatin wrote: >> >> > John Baldwin writes: >> > >> > > If you need to do more work in your interrupt routine than just wakeups >> > > and dinking with registers, you can always wake up a software interrupt >> > > handler or some other random kthread to do things that take a long amount >> >> (This is about normal interrupt handlers, not INTR_FAST ones.) >> >> > Dumb question: Exactly what is one allowed to do in an INTR_FAST >> > interrupt context? Obviously, you can't sleep. But can you call >> > wakeup()? > > What exactly defines a INTR_FAST interrupt context in the first > place. Do we have any rules for when it should be used, it just > seems to me that all interrupt handlers should be INTR_FAST and > that we'd then just have interrupt handlers. Since INTR_FAST handlers can't lock a normal mutex, this would require all device drivers to use spin locks (which either disable or defer interrupts) thus greatly increasing latency. INTR_FAST are only suitable for things such as sio(4) which need very low latency between interrupt assertion and handler execution and cannot deal with that latency for normal interrupt handlers. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/