Date: Tue, 8 Aug 2000 00:51:00 -0700 From: Alfred Perlstein <bright@wintelcom.net> To: David Greenman <dg@root.com> Cc: current@FreeBSD.ORG Subject: Re: Ugly, slow shutdown Message-ID: <20000808005100.A4854@fw.wintelcom.net> In-Reply-To: <200008080558.WAA05458@implode.root.com>; from dg@root.com on Mon, Aug 07, 2000 at 10:58:17PM -0700 References: <200008080238.TAA40871@vashon.polstra.com> <200008080558.WAA05458@implode.root.com>
next in thread | previous in thread | raw e-mail | index | archive | help
* David Greenman <dg@root.com> [000807 23:15] wrote:
> >In article <200008080135.SAA04815@implode.root.com>, David Greenman
> ><dg@root.com> 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
> >check.
>
> 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
> >proceeding.
>
> 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
> resist.
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.
-Alfred
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000808005100.A4854>
