From owner-freebsd-smp Wed Aug 27 15:00:33 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id PAA12440 for smp-outgoing; Wed, 27 Aug 1997 15:00:33 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.50]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id PAA12435 for ; Wed, 27 Aug 1997 15:00:30 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id OAA00591; Wed, 27 Aug 1997 14:59:04 -0700 From: Terry Lambert Message-Id: <199708272159.OAA00591@phaeton.artisoft.com> Subject: Re: A how does it work question. To: smp@csn.net (Steve Passe) Date: Wed, 27 Aug 1997 14:59:04 -0700 (MST) Cc: terry@lambert.org, petrilli@amber.org, mestery@winternet.com, peters@gil.com.au, smp@FreeBSD.ORG In-Reply-To: <199708272039.OAA29795@Ilsa.StevesCafe.com> from "Steve Passe" at Aug 27, 97 02:39:03 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-smp@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > > the kernel proper MP-safe, but each and EVERY driver needs work. > > > > Actually, you need a driver flag, and if it is not set, invoke the > > simple lock. This would let you set the flag (MPSAFE?) on drivers > > which didn't have the problem, and allow for a staged migration. > > At least one driver needs to be safed before the resto of them can > > be, using it as an example. > > thats already planned. sio.c and cy.c are already MP-safe from the kernel's > point of view. The problem is that they are not 'concurrancy-safe', ie > they never expected to be run concurrently by more than 1 CPU. This > sort of problem is not so well demonstrated with an example driver, as the > specific issues will vary from driver to driver. I don't think I understand the distinction. If by "the are already MP safe" you mean "because of the lock", that's not a flaggable attribute. Something which is MPSAFE flagged would have to allow itself to be reentered by the kernel. Crearly, a single interrupt is not reenterable for the same device context -- only for seperate device contexts, assuming a shared interrupt (PCI?). The flag I'm talking about is a "this driver may be reentered" flag; are you saying it's possible to reenter it on the same CPU, but not on a different CPU? That' might be one issue, but I don't think that would qualify for the MPSAFE flag... Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.