Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Feb 2004 20:13:47 +0100
From:      des@des.no (Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?=)
To:        Robert Watson <rwatson@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/vm vm_kern.c
Message-ID:  <xzpptcezvkk.fsf@dwp.des.no>
In-Reply-To: <Pine.NEB.3.96L.1040216134648.63057L-100000@fledge.watson.org> (Robert Watson's message of "Mon, 16 Feb 2004 13:55:51 -0500 (EST)")
References:  <Pine.NEB.3.96L.1040216134648.63057L-100000@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Robert Watson <rwatson@FreeBSD.org> writes:
> On Mon, 16 Feb 2004, Dag-Erling Smorgrav wrote:
> >   Log:
> >   Don't panic if we fail to satisfy an M_WAITOK request; return 0 inste=
ad.
> >   The calling code will either handle that gracefully or cause a page f=
ault.
> This substantially modifies the semantics of the two consumers of
> kmem_malloc(), and those semantic changes trickle up the stack to a number
> of important places.  Are you going to update the consumers (and their
> comments) as well?

This can only happen if you request a ridiculously large allocation;
if you actually run out of memory (e.g. due to a leak) you will get
"out of swap space" or similar errors instead.  There are several
cases in which kmem_malloc() would previously trigger "kmem_map too
small" even though the caller could recover gracefully if given half a
chance.  Before this patch there was no incentive to fix those cases
because you'd never get a change to try to recover anyway.

DES
--=20
Dag-Erling Sm=F8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzpptcezvkk.fsf>