From owner-p4-projects@FreeBSD.ORG Fri Jun 2 14:28:44 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 25C1A16A438; Fri, 2 Jun 2006 14:28:44 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B287616A44B; Fri, 2 Jun 2006 14:28:41 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id F124643D4C; Fri, 2 Jun 2006 14:28:40 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from [131.106.58.208] (72-255-64-174.client.stsn.net [72.255.64.174]) (authenticated bits=0) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k52ESdUS087910; Fri, 2 Jun 2006 10:28:39 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: kmacy@fsmware.com Date: Fri, 2 Jun 2006 10:22:43 -0400 User-Agent: KMail/1.9.1 References: <200605301926.k4UJQkgt055284@repoman.freebsd.org> <200605311657.44921.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200606021022.44509.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1506/Fri Jun 2 00:01:20 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: Perforce Change Reviews , Kip Macy Subject: Re: PERFORCE change 98153 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2006 14:28:50 -0000 On Thursday 01 June 2006 20:26, Kip Macy wrote: > > I'd rather avoid this for now as it will have to be backed out for interrupt > > filters. > > I don't know anything about interrupt filters, so please let me know > what you have in mind. The whole of interrupt handling is far too > heavyweight at the moment. With interrupt filters you can have both an INTR_FAST style handler and a threaded handler, and the INTR_FAST style handler will have a return value to determine if it's associated ithread should be scheduled and to let the calling code know if it has handled the interrupt so that it doesn't need to be masked, or if the interrupt wasn't for this device at all. > -Kip > > > > > > > > > Affected files ... > > > > > > .. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/intr_machdep.c#8 edit > > > > > > Differences ... > > > > > > ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/intr_machdep.c#8 > > (text+ko) ==== > > > > > > @@ -205,9 +205,15 @@ > > > > > > ps = intr_disable(); > > > if (vec != -1) { > > > - intr_vectors[vec].iv_func = ivf; > > > - intr_vectors[vec].iv_arg = iva; > > > - intr_vectors[vec].iv_pri = pri; > > > + if ((char *)intr_vectors[vec].iv_func == (char *)intr_stray_level) { > > > + intr_vectors[vec].iv_func = ivf; > > > + intr_vectors[vec].iv_arg = iva; > > > + } else { > > > + intr_vectors[vec].iv_func = intr_execute_handlers; > > > + intr_vectors[vec].iv_arg = &intr_vectors[vec]; > > > + } > > > + if (pri > intr_vectors[vec].iv_pri) > > > + intr_vectors[vec].iv_pri = pri; > > > intr_vectors[vec].iv_vec = vec; > > > } > > > snprintf(pilname, MAXCOMLEN + 1, "pil%d: %s", pri, pil_names[pri]); > > > @@ -315,8 +321,9 @@ > > > struct intr_vector *iv; > > > struct intr_event *ie; /* descriptor for the IRQ */ > > > struct intr_event *orphan; > > > - int errcode; > > > - > > > + int errcode, pil; > > > + iv_func_t *ivf; > > > + void *iva; > > > /* > > > * Work around a race where more than one CPU may be registering > > > * handlers on the same IRQ at the same time. > > > @@ -347,8 +354,11 @@ > > > if (errcode) > > > return (errcode); > > > > > > - intr_setup(flags & INTR_FAST ? PIL_FAST : PIL_ITHREAD, intr_fast, vec, > > > - intr_execute_handlers, iv); > > > + pil = (flags & INTR_FAST) ? PIL_FAST : PIL_ITHREAD; > > > + ivf = (flags & INTR_FAST) ? handler : intr_execute_handlers; > > > + iva = (flags & INTR_FAST) ? arg : iv; > > > + > > > + intr_setup(pil, intr_fast, vec, ivf, iva); > > > > > > intr_stray_count[vec] = 0; > > > > > > > > > > -- > > John Baldwin > > > -- John Baldwin