Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Jan 2003 15:53:35 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Bosko Milekic <bmilekic@unixdaemons.com>
Cc:        Jeffrey Hsu <hsu@FreeBSD.org>, arch@FreeBSD.org
Subject:   Re: Alfre's malloc changes: the next step
Message-ID:  <3E2F2EFF.657921AD@mindspring.com>
References:  <dillon@apollo.backplane.com> <0H94005IYWJT1Z@mta5.snfc21.pbi.net> <20030122162531.B77209@unixdaemons.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Bosko Milekic wrote:
> On Wed, Jan 22, 2003 at 01:20:59PM -0800, Jeffrey Hsu wrote:
> > I'm going to weigh in here on the side of the all the seasoned BSD veterans
> > that we should preserve the M_WAIT flag.  I like saying M_WAIT when I mean
> > M_WAIT.  I dislike saying 0 when I mean M_WAIT.
[ ... ]
> 
>   Not one of you has said why you think that the wait behavior should
>   not be the default behavior and why the dontwait behavior shouldn't be
>   treated like an exception.

I will:

The need for the wait behaviour at all is an artifact of improper
layering of state in legacy code.

All code should be able to tolerate an allocation failure, and
then back out the pending transaction if it happens.

The "wait" behaviour exists only because some code has a hard
time doing this, because it spreads it resource allocation
(and concommitant locking of those resources) across different
layers of functional abstraction.

The "wait" therefore exists because Bad Old Code(tm) exists.

It's a hell of a lot better, from a load-shedding and failure
recovery perspective, if *all* code tolerated low resource
conditions equally well, instead of some code tolerating it,
and some code going to sleep, and telling the rest of the
system "I'm not going to participate in voluntary resource
release protocols, I'm going to sleep; wake me up when the
crisis is over, thanks.".

The problem comes down to people wanting to make the minimal
hacks necessary to make things work, instead of doing things
the right way, because the right way is the slower way.

Toward that end, *I* suggest that M_WAIT *go away*, and that
the code that needs it be rewritten, instead of haggling over
this crap any more.  The mbuf code was *already* rewritten
this way, and FreeBSD is the better for it.

What this comes down to is that people should quit rearranging
the deck chairs on the Titanic, and *WHO CARES* about making
warty code less error prone, when you can delete it, warts and
all?

-- Terry

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?3E2F2EFF.657921AD>