From owner-freebsd-hackers Mon Aug 26 10:30:11 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7479D37B405 for ; Mon, 26 Aug 2002 10:29:57 -0700 (PDT) Received: from mail.speakeasy.net (mail12.speakeasy.net [216.254.0.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0874843E65 for ; Mon, 26 Aug 2002 10:29:57 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 24443 invoked from network); 26 Aug 2002 17:29:56 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail12.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 26 Aug 2002 17:29:56 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.5/8.12.5) with ESMTP id g7QHTsBQ035934; Mon, 26 Aug 2002 13:29:55 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <3D6A61F7.872038E5@exodus.net> Date: Mon, 26 Aug 2002 13:29:58 -0400 (EDT) From: John Baldwin To: Maksim Yevmenkin Subject: Re: Fast interrupts Cc: hackers@FreeBSD.ORG, "M. Warner Losh" , Bosko Milekic Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 26-Aug-2002 Maksim Yevmenkin wrote: > Bosko Milekic wrote: >> >> On Mon, Aug 26, 2002 at 09:41:43AM -0700, Maksim Yevmenkin wrote: >> > John Baldwin wrote: >> > > >> > > On 26-Aug-2002 M. Warner Losh wrote: >> > > > can you call wakeup(9) from a fast interrupt handler? >> > >> > [ ...] >> > >> > > > The only reason I ask is because sio seems to go out of its way to >> > > > schedule a soft interrupt to deal with waking up processes, which then >> > > > calls wakeup... >> > > >> > > Since wakeup only needs a spin lock, it is probably ok. You just can't call >> > > anything that would sleep (in any interrupt handler) or block on a non-spin > ^^^^^^^^^^^^^^^^^^^^^^^^^^ > my understanding is that John was talking about any > interrupt handler. Not just fast interrupt hander. Yes. When you block on a MTX_DEF mutex, that is not considered "sleeping" for the purposes of that statement. Sleeping is when you are in SSLEEP (well, what used to be called SSLEEP). >> > > mutex. >> > >> > what is the general locking technique for interrupt handlers? >> > there must be some sort of locking, right? >> >> You are allowed to use mutex locks (both spin and MTX_DEF), only you >> are only allowed to user the former for fast interrupt handlers. > > thanks, > max -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message