Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Jan 2003 17:03:19 -0500
From:      Bosko Milekic <bmilekic@unixdaemons.com>
To:        "M. Warner Losh" <imp@bsdimp.com>
Cc:        arch@freebsd.org
Subject:   Re: Alfre's malloc changes: the next step
Message-ID:  <20030121170319.B74210@unixdaemons.com>
In-Reply-To: <20030121.144243.52206100.imp@bsdimp.com>; from imp@bsdimp.com on Tue, Jan 21, 2003 at 02:42:43PM -0700
References:  <20030121.144243.52206100.imp@bsdimp.com>

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


On Tue, Jan 21, 2003 at 02:42:43PM -0700, M. Warner Losh wrote:
> In IRC there's much concern over alfred's changes from a cross os
> portability standpoint, as well as a SMP standpoint.  I'd like to

  Good!  I'm glad there is concern.  It's exactly what I think should
  happen because, quite frankly, there are significant subsystem
  differences right now that there *should* be ample concern about what
  happens when you make calls with M_DONTWAIT, M_TRYWAIT, M_WAITOK, or
  M_NOWAIT.

> propose that we do something like the following:
>
> 1) Make M_WAITOK and M_NOWAIT mandatory and exclusive in malloc.c.
>    You must specify one or the other, but not both.
> 2) We assign both M_WAITOK and M_NOWAIT values that aren't 0, let's
>    say 0x10 and 0x20.
> 3) We assign both M_DONTWAIT and M_TRYWAIT from mbuf.h values 0x40
>    and 0x80.
> 4) We back out the bulk of the changes made, except where they were
>    real bugs.
> 5) Hack the mbuf routines to reject M_DONTWAIT and M_TRYWAIT that
>    aren't the right value in flags.

   I'm not sure I understand point (5) here.  What do you mean "that
   aren't the right value in flags?"

> 6) Hack all the places where we did a boolean test before to do the
>    right testing of the new bits.
> 
> I think there'd be strong support for this.
> 
> I've done 1, 2, 3, 5 in my tree and am looking for #6 as well.  I'll
> post a patch once #6 is done.
> 
> Comments?
> 
> Warner

-- 
Bosko Milekic * bmilekic@unixdaemons.com * bmilekic@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?20030121170319.B74210>