Subject: Re: newlock
To: Andrew Doran <email@example.com>
From: Bill Studenmund <firstname.lastname@example.org>
Date: 09/11/2006 11:07:36
Content-Type: text/plain; charset=us-ascii
On Fri, Sep 08, 2006 at 06:46:17PM +0100, Andrew Doran wrote:
> On Fri, Sep 08, 2006 at 09:49:34AM -0700, Jason Thorpe wrote:
> > Can you explain to me again how the link/exit_linked stuff will work? =
> > I want to make sure I have my head wrapped around it properly. :-)
> It would look something like this:
Note, we have a potential issue here as well. In addition to the necessity
of a locking order, if both locks are driver locks (have IPL cookies),=20
then we have to make sure we grab them in the right order.
Since IPLs change from arch to arch, I think it's best to establish one=20
locking hierarchy, then have a routine that can cope with needing to=20
release a to get b. And code will have to cope with the lock potentially=20
being dropped while getting b.
> mutex_exit_linked(a, b);
> mutex_exit_linked(kmutex_t from, kmutex_t to)
> to->mtx_oldspl =3D from->mtx_oldspl;
That's probably fine.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (NetBSD)
-----END PGP SIGNATURE-----