Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Feb 2003 19:25:27 -0600
From:      "Alan L. Cox" <alc@imimic.com>
To:        arch@freebsd.org
Cc:        trb@freebsd.org
Subject:   TRB resolution of M_* changes to the memory and mbuf allocators
Message-ID:  <3E4EE887.73508A59@imimic.com>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E4EE887.73508A59>