Date: Wed, 29 May 2002 09:08:18 -0400 From: Bosko Milekic <bmilekic@unixdaemons.com> To: Terry Lambert <tlambert2@mindspring.com> Cc: Poul-Henning Kamp <phk@critter.freebsd.dk>, Peter Wemm <peter@wemm.org>, Richard Wenninger <richard@richardw.net>, current@FreeBSD.ORG Subject: Re: UMA lock Message-ID: <20020529090818.A61073@unixdaemons.com> In-Reply-To: <3CF476E7.D465D5C3@mindspring.com>; from tlambert2@mindspring.com on Tue, May 28, 2002 at 11:36:23PM -0700 References: <10399.1022653079@critter.freebsd.dk> <3CF476E7.D465D5C3@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 28, 2002 at 11:36:23PM -0700, Terry Lambert wrote: > Poul-Henning Kamp wrote: > > In message <20020529061540.88CD6380A@overcee.wemm.org>, 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 > practice. 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 mutex." > 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 -- Bosko Milekic bmilekic@unixdaemons.com bmilekic@FreeBSD.org 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?20020529090818.A61073>