Date: Tue, 21 Jan 2003 14:42:43 -0700 (MST) From: "M. Warner Losh" <imp@bsdimp.com> To: arch@freebsd.org Subject: Alfre's malloc changes: the next step Message-ID: <20030121.144243.52206100.imp@bsdimp.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030121.144243.52206100.imp>