From owner-freebsd-arch@FreeBSD.ORG Sat Mar 22 13:57:39 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 D7CA5106566B; Sat, 22 Mar 2008 13:57:39 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id B94018FC1A; Sat, 22 Mar 2008 13:57:39 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id F162146B4C; Sat, 22 Mar 2008 09:57:38 -0400 (EDT) Date: Sat, 22 Mar 2008 13:57:38 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Ruslan Ermilov In-Reply-To: <20080322105145.GA41672@team.vega.ru> Message-ID: <20080322135637.Y6961@fledge.watson.org> References: <20080322105145.GA41672@team.vega.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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: Sat, 22 Mar 2008 13:57:39 -0000 On Sat, 22 Mar 2008, Ruslan Ermilov wrote: > I'd like to remove the misleading uses of M_TRYWAIT throughout the tree and > clean up some dead code that assumes its original behavior (that it could > return NULL). > > 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.) > > There is little or no sign that this will change, and there are lots of > consumers that already pass M_WAITOK to mbuf allocator routines and rely on > its invariants, so support for the concept of M_TRYWAIT has rotted and would > have to be re-written anyway if reintroduced. > > http://people.freebsd.org/~ru/patches/M_TRYWAIT.patch 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 Computer Laboratory University of Cambridge