Subject: Re: CVS commit: src
To: None <hannken@netbsd.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 06/22/2004 21:41:02
> > >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().
YAMAMOTO Takashi