From owner-freebsd-arch Wed Jan 22 9:30:12 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 25AD737B401 for ; Wed, 22 Jan 2003 09:30:11 -0800 (PST) Received: from mail.speakeasy.net (mail16.speakeasy.net [216.254.0.216]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0ED1243F3F for ; Wed, 22 Jan 2003 09:30:10 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 1796 invoked from network); 22 Jan 2003 17:30:13 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail16.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 22 Jan 2003 17:30:13 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.6/8.12.6) with ESMTP id h0MHU5UT038189; Wed, 22 Jan 2003 12:30:07 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Wed, 22 Jan 2003 12:30:08 -0500 (EST) From: John Baldwin To: Daniel Eischen Subject: Re: M_ flags summary. Cc: arch@FreeBSD.ORG, bright@mu.org, "M. Warner Losh" , Bosko Milekic 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 22-Jan-2003 Daniel Eischen wrote: > On Wed, 22 Jan 2003, Bosko Milekic wrote: >> On Tue, Jan 21, 2003 at 10:20:25PM -0700, M. Warner Losh wrote: >> > In message: <20030121224148.A75236@unixdaemons.com> >> > Bosko Milekic writes: >> > : I think that defining M_TRYWAIT and M_WAITOK to 0 for KLD_MODULES is >> > : fine but I do not think that defining them to anything other than 0 is >> > : fine just so that we could add that KASSERT() that Warren suggested in >> > : the allocation code. As you point out, defining it to anything other >> > : than 0 would actually break ABI compatibility. Defining it to 0 for >> > : KLD_MODULES would preserve both API and ABI compatibility for those >> > : who actually care. Certainly, both M_TRYWAIT and M_WAITOK would have >> > : to be defined in order to maintain full backwards-API compatibility. >> > >> > Actually, I think that we shouldn't define them to be 0 for modules. >> > Instead, we should define them to the new values. However, we should >> > accpet '0' with the old meaning for a while (maybe with a printf). >> > There are going to be enough ABI changes between 5.0 and 5.branch that >> > worrying about this one is likely not worth the effort to do special >> > things for the modules. It isn't going to be too much longer before >> > it becomes impossible for 5.0-RELEASE compiled modules to not operate >> > with 5.0-CURRENT. > > [ Good summary elided ] > > Bosko convinces me. One other thing. How about adding another > version of malloc that _only_ acts as if M_NOWAIT was specified > and disallow M_NOWAIT from the original malloc()? If flags > confusion is a problem, then provide versions of malloc() > that don't have flags as arguments, or perhaps don't allow > M_WAITOK or M_NOWAIT. I originally didn't like this change either because I viewed M_WAITOK and M_NOWAIT as different types rather than treating NOWAIT as a flag. Now that I've adopted the latter view (just as M_ZERO, etc. are flags) I'm probably in favor of just leaving things as they are. The manner in which such an API was proposed and swiftly implemented w/o review leaves much to be desired, but I prefer the new API to the old one now. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message