From owner-freebsd-arch Tue Jan 21 13:44:34 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 851A237B401 for ; Tue, 21 Jan 2003 13:44:33 -0800 (PST) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7AD0A43F5F for ; Tue, 21 Jan 2003 13:44:32 -0800 (PST) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.6/8.12.3) with ESMTP id h0LLiR1e086752 for ; Tue, 21 Jan 2003 14:44:27 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 21 Jan 2003 14:42:43 -0700 (MST) Message-Id: <20030121.144243.52206100.imp@bsdimp.com> To: arch@freebsd.org Subject: Alfre's malloc changes: the next step From: "M. Warner Losh" X-Mailer: Mew version 2.1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 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 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. 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message