Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 May 2002 23:15:40 -0700
From:      Peter Wemm <peter@wemm.org>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        Richard Wenninger <richard@richardw.net>, current@FreeBSD.ORG
Subject:   Re: UMA lock 
Message-ID:  <20020529061540.88CD6380A@overcee.wemm.org>
In-Reply-To: <3CF468F0.EDECFE43@mindspring.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
Terry Lambert wrote:
> Peter Wemm wrote:
> > The bug is that things are calling things like malloc with M_WAITOK when
> > waiting is explicitly not allowed.  There are other functions that can
> > tsleep as well that we have not added checks for yet, so this is likely
> > just the tip of the iceberg.  :-(
> 
> Why is this a problem?  M_WAITOK does not mean that it will wait
> indefinitely, even though you'd think it would mean that, given
> the name...
> 
> I think _sleeping_ is a problem, but allocation with M_WAITOK
> shouldn't be, given it's strange definition of "waiting".  This
> is one of those hacks that John Baldwin was talking about earlier...

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.

Cheers,
-Peter
--
Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com
"All of this is for nothing if we don't go to the stars" - JMS/B5


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?20020529061540.88CD6380A>