From owner-freebsd-arch Sat Feb 15 17:25:35 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 72CAB37B405 for ; Sat, 15 Feb 2003 17:25:33 -0800 (PST) Received: from mail26a.sbc-webhosting.com (mail26a.sbc-webhosting.com [216.173.237.36]) by mx1.FreeBSD.org (Postfix) with SMTP id 177D243FB1 for ; Sat, 15 Feb 2003 17:25:32 -0800 (PST) (envelope-from alc@imimic.com) Received: from www.imimic.com (64.143.12.21) by mail26a.sbc-webhosting.com (RS ver 1.0.63s) with SMTP id 099602; Sat, 15 Feb 2003 20:25:20 -0500 (EST) Message-ID: <3E4EE887.73508A59@imimic.com> Date: Sat, 15 Feb 2003 19:25:27 -0600 From: "Alan L. Cox" Organization: iMimic Networking, Inc. X-Mailer: Mozilla 4.8 [en] (X11; U; Linux 2.4.2 i386) X-Accept-Language: en MIME-Version: 1.0 To: arch@freebsd.org Cc: trb@freebsd.org Subject: TRB resolution of M_* changes to the memory and mbuf allocators Content-Type: text/plain; charset=x-user-defined Content-Transfer-Encoding: 7bit X-Loop-Detect: 1 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 The TRB reviewed the change to the memory and mbuf allocators that removes the M_*WAIT* flags and replaces all occurrences in the source code with 0. Those in favor argued the change would: o eliminate typographic errors, o emphasize that these APIs have a default behavior (wait for operation to complete) with only exceptional cases marked by a flag argument, and o emphasize to developers that synchronization issues cannot be solved simply by making allocation requests non-blocking. Those opposed to the change argued: o this breaks source-code compatibility with prior releases of FreeBSD as well as other systems with the same APIs (e.g. netbsd, openbsd), o typographic errors of the sort described are better handled by defining names with unique non-zero values that can then be validated in the routines where they are passed as parameters, o the allocators have not historically had a default behaviour, o removing the explicit specification of whether to wait or not wait at each call site removes useful information from the source code, and o the synchronization issues intended to be addressed will not be solved in this way but instead require developer education. After careful review of arguments from both sides the TRB voted: In favor of change: 0 Opposed to change: 9 Abstain: 0 It is the TRB's decision that this change should be reverted; and instead the course of action outlined below should be followed. 1) Revert to the old API 2) Put enforcement into malloc/mbuf so that you have to specify a flag. 2a)with the default being NOWAIT/WAITOK if you don't for a transition period. 3) Put witness checks in malloc for "sleepability." 4) Make all the M_* flags unique to avoid possible misuse. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message