From owner-freebsd-smp Wed Aug 27 11:27:50 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id LAA25594 for smp-outgoing; Wed, 27 Aug 1997 11:27:50 -0700 (PDT) Received: from Ilsa.StevesCafe.com (Ilsa.StevesCafe.com [205.168.119.129]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id LAA25588 for ; Wed, 27 Aug 1997 11:27:47 -0700 (PDT) Received: from Ilsa.StevesCafe.com (localhost [127.0.0.1]) by Ilsa.StevesCafe.com (8.8.7/8.8.5) with ESMTP id MAA29172; Wed, 27 Aug 1997 12:26:36 -0600 (MDT) Message-Id: <199708271826.MAA29172@Ilsa.StevesCafe.com> X-Mailer: exmh version 2.0gamma 1/27/96 From: Steve Passe To: Terry Lambert cc: petrilli@amber.org (Christopher Petrilli), mestery@winternet.com, peters@gil.com.au, smp@FreeBSD.ORG Subject: Re: A how does it work question. In-reply-to: Your message of "Wed, 27 Aug 1997 09:37:28 PDT." <199708271637.JAA05609@phaeton.artisoft.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 27 Aug 1997 12:26:35 -0600 Sender: owner-freebsd-smp@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Hi, I suppose I should summarize the current state of SMP: - fast intrrrupts no longer use the giant lock. There is a simple lock that prevents more than 1 fast interrupt from being in the kernel at once, but this is strictly because of the way sio and cy are written, not because the kernel couldn't do it, it could (I think!). Specifically they use global variables that they implicitly expect to be non-volatile while they are inside their ISR. If say, tty0 and tty1 both were inside at the same time it would break. This points out a simple fact we will have to deal with: most if not all the drivers are not MP-safe, and each will need work to become so. Its not as simple as making the kernel proper MP-safe, but each and EVERY driver needs work. - regular (slow) interrupts are still controlled by the giant lock. I have rounded up all the accesses of cpl & ipending into 'critical regions', ie the access/modification of cpl/ipending by the spl and ISR functions are now MP-safe. The final step is the removal of the giant lock from regular interrupts. This will require the separation of the ISR mask component added by the ISRs to the cpl into a separate variable and additional code in the spl functions to prevent them from changing cpl while any ISR is inside a critical cpl region. This is what I am working on now. At first there will be a simple lock used to serialize all reg. interrupts as with the fast ints, but once this works I plan to use an array of simple locks, one per IRQ. To go beyond this will again require work on each driver. - John is working on the use of the lock manager to protect all the VM accesses. Once this is ready, he will remove the giant lock from the VM traps. -- Steve Passe | powered by smp@csn.net | Symmetric MultiProcessor FreeBSD