Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Nov 1999 14:09:13 -0500 (EST)
From:      Bosko Milekic <bmilekic@dsuper.net>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        David Greenman <dg@root.com>, remy@synx.com, julian@whistle.com, freebsd-hackers@FreeBSD.ORG
Subject:   Re: mbuf wait code (revisited) -- review? 
Message-ID:  <Pine.OSF.4.05.9911181359420.157-100000@oracle.dsuper.net>
In-Reply-To: <199911181622.IAA85547@apollo.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 18 Nov 1999, Matthew Dillon wrote:

!>    wakeup_one is really a very dangerous routine to use if you
!>    aren't careful.  If the one process that is woken up does not
!>    do the correct thing (call wakeup_one again if it cannot 
!>    immediately get the resource it was waiting on) you can lockup
!>    the system.
!>
!>    I would not recommend using wakeup_one in anything but an
!>    integrated manner.  That is, for example, if you were to
!>    encapsulate the mbuf wait-for-free and mbuf freeing code
!>    into their own routines you could then safely implement use
!>    of wakeup_one within those routines.  But if you try to implement
!>    wakeup_one in all the myrid places where the mbuf code
!>    might interact in this manner, you create serious instability
!>    in the codebase.

	I'm not sure if you have read the [original] patch that I had posted
about a week ago. Both the mbuf-wait and mbuf-cluster-wait routines (as well
as their "wakeup" routines) are just that, separate routines. The sleep
routines are called through the MGET, MGETHDR, and MCLALLOC macros, 
depending of course whether the sleep is for an mbuf or mbuf cluster.
	The place where wakeup() was originally called was also a routine
that I defined in kern/uipc_mbuf.c and that was invoked through the macros
that freed an mbuf or an mbuf chain (along with the mbuf clusters).
	The plan is to fiddle with those _new_ routines.

!>
!>					-Matt
!>					Matthew Dillon 
!>					<dillon@backplane.com>
!>

--
 Bosko Milekic <bmilekic@technokratis.com>



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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.OSF.4.05.9911181359420.157-100000>