Subject: Re: CVS commit: src
To: None <tech-kern@netbsd.org>
From: Juergen Hannken-Illjes <hannken@netbsd.org>
List: tech-kern
Date: 06/22/2004 14:42:46
On Tue, Jun 22, 2004 at 09:41:02PM +0900, YAMAMOTO Takashi wrote:
> > > >I'm not fully sure why, but I'm more comfortable with this complexity
> > > >in
> > > >the lock manager.
> > >
> > > I'm not. The more overhead the locking primitives we have are (and
> > > lockmgr is pretty heavy-weight), we can pretty much never hope to have
> > > a scalable MP implementation.
> > >
> > > Put complexity in the things that require it, don't add complexity to
> > > places where it is seldom needed.
> >
> > Is this one possible? Should add no overhead to the lock manager.
>
> > void
> > transferlockers(struct lock *from, struct lock *to)
> > {
> > if (from->lk_waitcount == 0)
> > return;
> >
> > if (from->lk_flags & LK_WAITDRAIN)
> > transfer_sleepers((void *)&from->lk_flags,
> > (void *)&to->lk_flags);
> > else
> > transfer_sleepers((void *)from, (void *)to);
> > }
>
> i don't think it works because it won't switch "lkp" in acquire().
You're right, sorry for the confusion...
--
Jürgen Hannken-Illjes - hannken@netbsd.org