From owner-freebsd-current Thu Dec 21 13:57:29 2000 From owner-freebsd-current@FreeBSD.ORG Thu Dec 21 13:57:26 2000 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from falla.videotron.net (falla.videotron.net [205.151.222.106]) by hub.freebsd.org (Postfix) with ESMTP id 5452A37B400 for ; Thu, 21 Dec 2000 13:57:26 -0800 (PST) Received: from modemcable213.3-201-24.mtl.mc.videotron.ca ([24.201.3.213]) by falla.videotron.net (Sun Internet Mail Server sims.3.5.1999.12.14.10.29.p8) with ESMTP id <0G5X00G4RUBNTK@falla.videotron.net> for freebsd-current@freebsd.org; Thu, 21 Dec 2000 16:57:23 -0500 (EST) Date: Thu, 21 Dec 2000 16:58:20 -0500 (EST) From: Bosko Milekic Subject: mini HEADS-UP: M_WAIT renamed to M_TRYWAIT To: freebsd-current@freebsd.org Message-id: MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello, this is a mini-HEADSUP mainly targeted at those working on the kernel source in FreeBSD-CURRENT. In short, for the mbuf subsystem: M_WAIT is now deprecated and M_TRYWAIT should be used in its place. Summary: This ONLY applies to allocations for the "mbuf subsystem" and NOT any allocations with malloc() or any other subsystems: The M_WAIT flag has been renamed to M_TRYWAIT. The commit message explains the reason for the rename. It basically has to do with the developer needing to check whether calls to m_get(), m_gethdr() (and their macro equivalents MGET and MGETHDR) as well as calls to the mbuf cluster allocation routines and macros return a NULL pointer. In other words, even calls with M_(TRYWAIT) may fail in allocating mbufs or mbuf clusters and therefore must be accompanied by a check for that failure. This has been the case for a while and the time spent blocking/waiting for resources is tunable with the kern.ipc.mbuf_wait sysctl. The flag name has been changed in an effort to "communicate the right message" to developers, especially those porting code from NetBSD and OpenBSD where M_WAIT means "block indefinetely if you can't get me anything." M_WAIT is now deprecated and M_TRYWAIT should be used in its place. Happy Holidays! Bosko Milekic bmilekic@technokratis.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message