From owner-freebsd-arch@FreeBSD.ORG Sun Mar 23 09:08:33 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 DF0F1106566C for ; Sun, 23 Mar 2008 09:08:33 +0000 (UTC) (envelope-from rermilov@team.vega.ru) Received: from mail.vega.ru (infra.dev.vega.ru [90.156.167.14]) by mx1.freebsd.org (Postfix) with ESMTP id 8A6F78FC16 for ; Sun, 23 Mar 2008 09:08:33 +0000 (UTC) (envelope-from rermilov@team.vega.ru) Received: from [87.242.97.68] (port=64187 helo=edoofus.dev.vega.ru) by mail.vega.ru with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68 (FreeBSD)) (envelope-from ) id 1JdMBq-0003nk-1M; Sun, 23 Mar 2008 09:08:30 +0000 Received: from edoofus.dev.vega.ru (localhost [127.0.0.1]) by edoofus.dev.vega.ru (8.14.2/8.14.2) with ESMTP id m2N98OZd037359; Sun, 23 Mar 2008 12:08:24 +0300 (MSK) (envelope-from rermilov@team.vega.ru) Received: (from ru@localhost) by edoofus.dev.vega.ru (8.14.2/8.14.2/Submit) id m2N98Nuq037358; Sun, 23 Mar 2008 12:08:23 +0300 (MSK) (envelope-from rermilov@team.vega.ru) X-Authentication-Warning: edoofus.dev.vega.ru: ru set sender to rermilov@team.vega.ru using -f Date: Sun, 23 Mar 2008 12:08:23 +0300 From: Ruslan Ermilov To: Sam Leffler Message-ID: <20080323090823.GA37326@team.vega.ru> References: <20080322105145.GA41672@team.vega.ru> <20080322135637.Y6961@fledge.watson.org> <200803230104.m2N14xlf026184@apollo.backplane.com> <20080322153658.K910@desktop> <47E5D613.4060005@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47E5D613.4060005@freebsd.org> User-Agent: Mutt/1.5.17 (2007-11-01) 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 09:08:34 -0000 On Sat, Mar 22, 2008 at 09:01:23PM -0700, Sam Leffler wrote: > We made a decision a while back to not use malloc flags for mbuf routine > arguments. While I can see the point in this (if we ever change the mbuf allocator from UMA to something else), like I said in my email, a lot of code already uses malloc flags for this. > There are even assertions to verify it. I think this was OBE, now mbuf.h says: : /* : * Flags specifying how an allocation should be made. : * : * The flag to use is as follows: : * - M_DONTWAIT or M_NOWAIT from an interrupt handler to not block allocation. : * - M_WAIT or M_WAITOK from wherever it is safe to block. : * : * M_DONTWAIT/M_NOWAIT means that we will not block the thread explicitly and : * if we cannot allocate immediately we may return NULL, whereas : * M_WAIT/M_WAITOK means that if we cannot allocate resources we : * will block until they are available, and thus never return NULL. : * : * XXX Eventually just phase this out to use M_WAITOK/M_NOWAIT. : */ : #define MBTOM(how) (how) : #define M_DONTWAIT M_NOWAIT : #define M_TRYWAIT M_WAITOK : #define M_WAIT M_WAITOK Cheers, -- Ruslan Ermilov ru@FreeBSD.org FreeBSD committer