From owner-freebsd-smp Thu Dec 5 11:06:53 1996 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id LAA24838 for smp-outgoing; Thu, 5 Dec 1996 11:06:53 -0800 (PST) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.8.4/8.8.4) with SMTP id LAA24827 for ; Thu, 5 Dec 1996 11:06:51 -0800 (PST) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id LAA19654; Thu, 5 Dec 1996 11:46:00 -0700 From: Terry Lambert Message-Id: <199612051846.LAA19654@phaeton.artisoft.com> Subject: Re: make locking more generic? To: smp@csn.net (Steve Passe) Date: Thu, 5 Dec 1996 11:45:59 -0700 (MST) Cc: vanmaren@fast.cs.utah.edu, ccsanady@friley216.res.iastate.edu, peter@spinner.dialix.com, smp@freebsd.org In-Reply-To: <199612051804.LAA13790@clem.systemsix.com> from "Steve Passe" at Dec 5, 96 11:04:17 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-smp@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > If you have a driver that is used for two devices, and you > > allow both to generate interrupts and have the driver executing > > on two processors simultaneously, the shared data structures > > are not going to be protected. So the simple fix would be to > > put a lock around each driver. But you will still have > > problems with other shared data structures; the same problem > > with allowing multiple processes to make kernel calls. > > one thing to know about is that the APIC has a notion of 'focus processor'. > this means that if a CPU is currently servicing a specific IRQ, if that > IRQ is generated again the request is sent to that CPU, reguardless of > TPR and/or PPR I think Kevin was more conserned about having a single Adaptec driver and two controllers, on different interrupts, but with perhaps serially accessed global structures. The serial access is the result of the way interrupt delivery is currently handled. For instance, I may get INT 14 and INT 15 to enter the same driver, which has an unguarded list for, for instance, available bounce buffers, regardless of the number of controllers. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.