Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Sep 2000 16:37:51 -0700 (PDT)
From:      John Baldwin <jhb@FreeBSD.ORG>
To:        Chuck Paterson <cp@bsdi.com>
Cc:        freebsd-arch@FreeBSD.ORG, freebsd-net@FreeBSD.ORG, Bosko Milekic <bmilekic@technokratis.com>
Subject:   Re: mbuf system and SMPng
Message-ID:  <XFMail.000923163751.jhb@FreeBSD.org>
In-Reply-To: <200009232243.QAA19490@berserker.bsdi.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On 23-Sep-00 Chuck Paterson wrote:
> 
> Date: Sat, 23 Sep 2000 14:46:44 -0400
> From:  Bosko Milekic <bmilekic@technokratis.com>
> To:  Chuck Paterson <cp@bsdi.com>
> Subject:  Re: mbuf system and SMPng
> cc:  freebsd-net@FreeBSD.ORG, freebsd-arch@FreeBSD.ORG
> 
> Bosko Milekic wrote on: Sat, 23 Sep 2000 14:46:44 EDT
> 
> }     Indeed, the lock being released before the asleep() being called in
> }  m_mballoc_wait() is somewhat of a race. I was planning to get rid of the
> }  asleep/await combo anyway (noted in my journal). In fact, MGET() can be
> }  called even with the mutex held, it will just result in recursive
> }  grabbing of the mutex, but it's better to just re-arrange the macro with
> }  a lower-level one, as you say (I noticed BSD/OS does something like
> }  this).
> }
> 
>       One thing to remember about the recursive stuff is that
> passing a recursively held mutex to msleep() will not get the
> mutex released, it will only release it one time. This means
> that you likely won't be able to get a wakeup.  This could
> be changed, but ->>in general<<- something has gone very wrong
> if the mutex passed in to msleep() is recursively held. There
> is likely a layer of code that is expecting that its data is protected,
> and is not expecting some other process to be able to get at it.

Hmm, do we want to add a KASSERT() to msleep() then to verify
that the mutex isn't recursed when we release it?
 
> Chuck

-- 

John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.000923163751.jhb>