* David Greenman <[EMAIL PROTECTED]> [000807 23:15] wrote:
> >In article <[EMAIL PROTECTED]>, David Greenman
> ><[EMAIL PROTECTED]> wrote:
> >Obviously the waker-upper knows that the condition is true. Otherwise
> >the existing code which doesn't check wouldn't work. In the expensive
> >cases the waker-upper could simply set a flag for the sleeper to
> For me, that doesn't make the code easier to read or understand - it has
> the opposite effect. ...but then I'm used to the historical symantics and
> naturally consider the possible cases when looking at the code.
> >Note, I am not expressing an opinion about whether the sleeps should
> >be terminated prematurely during shutdown. But I am expressing a
> >strong opinion about whether sleepers should do a reality check before
> I could be persuaded to think that way, but I still remain unconvinced.
> Again, I'm used to the historical symantics, so changing them requires a
> pretty good justification and a bit of brain rewiring, which I naturally
It's not just that, if you always have to cover your behind when
doing tsleep you may wind up masking wakeup bugs. Places like
"vfs_bio.c" line 586 of 3182:
bp->b_xflags |= BX_BKGRDWAIT;
tsleep(&bp->b_xflags, PRIBIO, "biord", 0);
if (bp->b_xflags & BX_BKGRDINPROG)
panic("bwrite: still writing");
If replaced by a while() _may_ obscure a buffercache bug.
Personally I'd like to be able to catch such bugs than let them go
because the API (wakeups can happen at any time) prohibits this.
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message