From owner-freebsd-arch Tue Jan 21 14: 1:51 2003 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 87D9537B483 for ; Tue, 21 Jan 2003 14:01:43 -0800 (PST) Received: from tesla.distributel.net (nat.MTL.distributel.NET [66.38.181.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA09843ED8 for ; Tue, 21 Jan 2003 14:01:42 -0800 (PST) (envelope-from bmilekic@unixdaemons.com) Received: (from bmilekic@localhost) by tesla.distributel.net (8.11.6/8.11.6) id h0LM3Kb74276; Tue, 21 Jan 2003 17:03:20 -0500 (EST) (envelope-from bmilekic@unixdaemons.com) Date: Tue, 21 Jan 2003 17:03:19 -0500 From: Bosko Milekic To: "M. Warner Losh" Cc: arch@freebsd.org Subject: Re: Alfre's malloc changes: the next step Message-ID: <20030121170319.B74210@unixdaemons.com> References: <20030121.144243.52206100.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20030121.144243.52206100.imp@bsdimp.com>; from imp@bsdimp.com on Tue, Jan 21, 2003 at 02:42:43PM -0700 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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