On Wed, Feb 20, 2002 at 10:21:57AM -0600, Dave Kleikamp wrote:
> > lbmREAD get's cleared by lbmIODone without any atomicy guarntees.
> > A possible soloution might be to use bitops on ->l_flag, but that
> > would make lbmWrite rather ugly.
>
> Is this really a race? Since lbmIODone is not racing with anyone else
> trying to modify bp->l_flag, that should be safe. I think the design of
> wait_event ensures that as long as lbmIODone resets the lbmREAD flag
> before calling wakeup (LCACHE_WAKEUP), lbmRead will be awakened if it
> needs to be.
I think you are right. I worried about CPUs reordering writes, but the
!= in fact checks all possible modifications done in lbmIODone, unlike
a & test.
Christoph
--
Of course it doesn't work. We've performed a software upgrade.
_______________________________________________
Jfs-discussion mailing list
[EMAIL PROTECTED]
http://www-124.ibm.com/developerworks/oss/mailman/listinfo/jfs-discussion