From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 6 09:39:46 2003 Return-Path: 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 0A28A37B401 for ; Fri, 6 Jun 2003 09:39:46 -0700 (PDT) Received: from mail.speakeasy.net (mail11.speakeasy.net [216.254.0.211]) by mx1.FreeBSD.org (Postfix) with ESMTP id 663EB43FB1 for ; Fri, 6 Jun 2003 09:39:45 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 600 invoked from network); 6 Jun 2003 16:39:44 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender )encrypted SMTP for ; 6 Jun 2003 16:39:44 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.8/8.12.8) with ESMTP id h56Gdgp0014082; Fri, 6 Jun 2003 12:39:43 -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: <20030605.181430.22017364.imp@bsdimp.com> Date: Fri, 06 Jun 2003 12:39:43 -0400 (EDT) From: John Baldwin To: "M. Warner Losh" cc: freebsd-hackers@freebsd.org Subject: Re: interrupt handlers in -current X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jun 2003 16:39:46 -0000 On 06-Jun-2003 M. Warner Losh wrote: > In message: > Duncan Barclay writes: >: >: On 05-Jun-2003 M. Warner Losh wrote: >: > In message: >: > Duncan Barclay writes: >: >: This is more of a confirmation of my understanding than anything else. >: >: In -current, should an interrupt thread be created you set up an interrupt >: >: handler? If so, then I'd better check my code because I haven't got one! >: > >: > No. Just because we handle interrupts in a thread doesn't mean client >: > devices need to create a thread. The thread is creted automatically >: > and the routine passed to bus_setup_intr() is then called when an >: > interrupt happens. >: >: Rereading what I wrote, I might have mistyped and asked the wrong question. >: >: I think what you saying is that bus_setup_intr() doesn't create the thread, >: (in the sense of it appear in ps -ax?) >: but a thread is created automatically when the first interrupt occurs? > > The thread is created right away. However, if this interrupt is > shared with another device, you'll see seomthing like: > > root 23 0.0 0.0 0 12 ?? WL 11:35AM 0:04.24 (irq10: cbb0 cbb1++) > > which says taht cbb0 and cbb1 (and others) share irq10. The thread is created right away, but I think KSE broke ps/top in that they don't show new processes anymore that haven't run yet. This is definitely a bug in the kernel. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/