On Tue, May 28, 2002 at 11:36:23PM -0700, Terry Lambert wrote:
> Poul-Henning Kamp wrote:
> > In message <[EMAIL PROTECTED]>, Peter Wemm writes:
> > >As you said, _sleeping_ is the problem. M_WAITOK means "you may sleep if
> > >you like". ie: it is a time bomb waiting for the right low memory condition
> > >which will then explode with a 100% authentic crash or lock up.
> > >
> > >Pretend it said M_SLEEPOK instead of M_WAITOK.
> > Uhm, I'm actually seeing the opposite behaviour as well: after I
> > changed the md(4) driver to use M_NOWAIT I still see malloc/zalloc
> > sleeping...
> I'm with Poul on this one, Peter: M_WAITOK doesn't mean what
> you think it means: it's doesn't mean tsleep may be called,
> and M_NOWAIT doesn't mean tsleep() _won't_ be called, in
With the same amount of time you spent typing up this Email, you could
have checked the code and seen that M_WAITOK _does_ mean that tsleep
may be called and that, in effect, M_NOWAIT means that tsleep will not
be called. If we have cases where tsleep is called and are M_NOWAIT,
then that's not good. M_NOWAIT means: "only allowed to block on a
> It's either incredibly badly named, or it's incredibly badly
> implemented -- I would argue the latter, actually, since even
> if it's completely orthogonal, you're screwed because it means
> you have two call conversion systems, without a WITNESS
> intersection to detect deadly embraces. 8-(.
> -- Terry
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message