From owner-freebsd-current Tue Feb 26 7: 3:37 2002 Delivered-To: freebsd-current@freebsd.org Received: from mail12.speakeasy.net (mail12.speakeasy.net [216.254.0.212]) by hub.freebsd.org (Postfix) with ESMTP id E946737B41A for ; Tue, 26 Feb 2002 07:02:36 -0800 (PST) Received: (qmail 2503 invoked from network); 26 Feb 2002 15:02:35 -0000 Received: from unknown (HELO laptop.baldwin.cx) ([65.90.117.54]) (envelope-sender ) by mail12.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 26 Feb 2002 15:02:35 -0000 Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20020226185416.P43865-100000@gamplex.bde.org> Date: Tue, 26 Feb 2002 10:02:34 -0500 (EST) From: John Baldwin To: Bruce Evans Subject: Re: Patch for critical_enter()/critical_exit() & interrupt assem Cc: Terry Lambert , Cc: Terry Lambert , Alfred Perlstein , Bosko Milekic , Seigo Tanimura , current@FreeBSD.org, Matthew Dillon Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 26-Feb-02 Bruce Evans wrote: > On Tue, 26 Feb 2002, John Baldwin wrote: > >> The critical section stuff currently in current is part of the original >> preemption patches I wrote at Usenix last year. They aren't in the tree >> because they aren't stable yet. We still have problems on the alpha and >> problems with IPI deadlocks on SMP machines that need to be worked out. >> Since >> this API is still very much in flux I'd prefer to keep it simple for now and >> not make the code overly complex with optimizations until after we have >> settled >> on the design. > > The change is mostly part of the design change needed to un-break fast > interrupt handlers. critical_enter() mask not mask hardware > interrupts for the same reason than splhigh() must not mask them: > there is too much MI code that thinks it is critical and short but > really isn't (e.g., everything under spinlocks in -current). Changing > cpu_critical_enter() to a null version to prevent spinlocks masking > interrupts doesn't work very well because it is used for other things > that really do need to mask interrupts. Having 2 levels for > cpu_critical_enter() (on that masks normal interrupts and one that > masks fast interrupts) would work but I think there are already too > many levels of critical_enter()s. I think having the sparc-like API of intr_disable() / intr_restore() that we used to use to fix the places that assume too many implementation details of cpu_critical_foo() would be a good first step so that cpu_critical_foo() can be relegated back to supporting non-preemption (and no other spinlocks) and nothing else. > Bruce -- 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-current" in the body of the message