Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Mar 2008 15:37:23 -1000 (HST)
From:      Jeff Roberson <jroberson@chesapeake.net>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        arch@freebsd.org, Robert Watson <rwatson@freebsd.org>
Subject:   Re: Disposal of a misleading M_TRYWAIT
Message-ID:  <20080322153658.K910@desktop>
In-Reply-To: <200803230104.m2N14xlf026184@apollo.backplane.com>
References:  <20080322105145.GA41672@team.vega.ru> <20080322135637.Y6961@fledge.watson.org> <200803230104.m2N14xlf026184@apollo.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 22 Mar 2008, Matthew Dillon wrote:

>
> :> Since the advent of MBUMA in FreeBSD (whatever), M_TRYWAIT has meant
> :> M_WAITOK.  (The reason for M_TRYWAIT itself was that an original mbuf's
> :> M_WAIT could return NULL.)
> :>
> :..
> :
> :This seems reasonable to me for exactly the reasons you stte.  We might
> :simultaneously want to complete the M_DONTWAIT -> M_NOWAIT conversion.  And
> :you can then remove the XXX comment in mbuf.h about phasing out M_TRYWAIT and
> :M_DONTWAIT.  :-)
> :
> :Robert N M Watson
>
>    The real issue is the fact that both the kernel malloc and the mbuf
>    allocation APIs are using the same M_ prefix for their flags.
>
>    We converted our mbuf allocator flags (aka M_DONTWAIT, M_TRYWAIT, M_WAIT)
>    from M_ to MB_ and the code became a whole lot easier to read.
>
>    I would not recommend converting the mbuf allocator to actually *USE*
>    kernel malloc flags.  The problem there is that you then have no clear
>    delineation between M_ flags supported by malloc and M_ flags supported
>    by the mbuf allocator.

They have been the same allocator for some time now.  It makes more sense 
for them to use the same flags.

Jeff

>
> 						-Matt
>
> _______________________________________________
> freebsd-arch@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-arch
> To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
>



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