From owner-freebsd-arch@FreeBSD.ORG Sun Mar 23 01:16:34 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7A2E106564A; Sun, 23 Mar 2008 01:16:34 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.freebsd.org (Postfix) with ESMTP id 99E3A8FC12; Sun, 23 Mar 2008 01:16:34 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.14.1/8.13.7) with ESMTP id m2N14xWK026185; Sat, 22 Mar 2008 18:04:59 -0700 (PDT) Received: (from dillon@localhost) by apollo.backplane.com (8.14.1/8.13.4/Submit) id m2N14xlf026184; Sat, 22 Mar 2008 18:04:59 -0700 (PDT) Date: Sat, 22 Mar 2008 18:04:59 -0700 (PDT) From: Matthew Dillon Message-Id: <200803230104.m2N14xlf026184@apollo.backplane.com> To: Robert Watson References: <20080322105145.GA41672@team.vega.ru> <20080322135637.Y6961@fledge.watson.org> Cc: arch@freebsd.org Subject: Re: Disposal of a misleading M_TRYWAIT X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Mar 2008 01:16:34 -0000 :> Since the advent of MBUMA in FreeBSD (whatever), M_TRYWAIT has meant :> M_WAITOK. (The reason for M_TRYWAIT itself was that an original mbuf's :> M_WAIT could return NULL.) :> :.. : :This seems reasonable to me for exactly the reasons you stte. We might :simultaneously want to complete the M_DONTWAIT -> M_NOWAIT conversion. And :you can then remove the XXX comment in mbuf.h about phasing out M_TRYWAIT and :M_DONTWAIT. :-) : :Robert N M Watson The real issue is the fact that both the kernel malloc and the mbuf allocation APIs are using the same M_ prefix for their flags. We converted our mbuf allocator flags (aka M_DONTWAIT, M_TRYWAIT, M_WAIT) from M_ to MB_ and the code became a whole lot easier to read. I would not recommend converting the mbuf allocator to actually *USE* kernel malloc flags. The problem there is that you then have no clear delineation between M_ flags supported by malloc and M_ flags supported by the mbuf allocator. -Matt