From owner-p4-projects@FreeBSD.ORG Tue Aug 1 18:34:45 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 680D616A4DD; Tue, 1 Aug 2006 18:34:45 +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 4407116A4E6; Tue, 1 Aug 2006 18:34:45 +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 D4BD643D83; Tue, 1 Aug 2006 18:34:34 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k71IYMKC081390; Tue, 1 Aug 2006 14:34:28 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Sam Leffler Date: Tue, 1 Aug 2006 14:34:06 -0400 User-Agent: KMail/1.9.1 References: <200608011725.k71HP4ol019342@repoman.freebsd.org> <44CF928B.7020102@errno.com> In-Reply-To: <44CF928B.7020102@errno.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200608011434.07440.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 01 Aug 2006 14:34:29 -0400 (EDT) X-Virus-Scanned: ClamAV 0.87.1/1630/Tue Aug 1 11:38:56 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 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 , Paolo Pisati Subject: Re: PERFORCE change 102954 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: Tue, 01 Aug 2006 18:34:45 -0000 On Tuesday 01 August 2006 13:42, Sam Leffler wrote: > Paolo Pisati wrote: > > http://perforce.freebsd.org/chv.cgi?CH=102954 > > > > Change 102954 by piso@piso_newluxor on 2006/08/01 17:24:16 > > > > Convert ath to use a filter+ithread handler: > > > > use a spinlock (inside softc) to guard against > > races when accessing sc_status or the interrupt registers, > > and axe all the taskqueue jobs from ath_intr(). > > I highly doubt this does the right thing and the spinlock is almost > certain to be the wrong thing to do here. We should probably talk > privately about how to restructure ath to use your stuff but I expected > a very different approach. I think it shouldn't actually need a lot of restructuring at all. The existing ath_intr() function should be the filter, but instead of creating a task for the higher level handle, it just returns a flag to ask the interrupt code to schedule it. This only handles 1 handler though, so if you kick off multiple tasks you might need to do some tweaking there (either do the most common one as the handler and still use taskqueue for the others or perhaps have the handler be a little "fatter"). This does seem like a lot more code churn than is necessary. -- John Baldwin