Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Dec 1996 11:42:39 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        vanmaren@fast.cs.utah.edu (Kevin Van Maren)
Cc:        smp@csn.net, vanmaren@fast.cs.utah.edu, ccsanady@friley216.res.iastate.edu, peter@spinner.dialix.com, smp@freebsd.org
Subject:   Re: make locking more generic?
Message-ID:  <199612051842.LAA19641@phaeton.artisoft.com>
In-Reply-To: <199612051759.KAA19283@fast.cs.utah.edu> from "Kevin Van Maren" at Dec 5, 96 10:59:01 am

next in thread | previous in thread | raw e-mail | index | archive | help
> 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.

I believe the correct intermediate method would be to bind the
driver service to the CPU for the duration of the service cycle,
such that other interrupts for the driver are serviced by the same
CPU.

This is somewhat counter-intuitive; you might think that a lock
around the driver is the simple fix; but it affords no migration
path for getting concurrency before you get loose CPU binding.
So you want:

1)	The current situation
2)	Driver/CPU affinity
3)	Driver/CPU independency

My opinion, anyway.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199612051842.LAA19641>