Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Feb 2004 13:55:51 -0500 (EST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Dag-Erling Smorgrav <des@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/vm vm_kern.c
Message-ID:  <Pine.NEB.3.96L.1040216134648.63057L-100000@fledge.watson.org>
In-Reply-To: <200402161841.i1GIfwmv008267@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On Mon, 16 Feb 2004, Dag-Erling Smorgrav wrote:

> des         2004/02/16 10:41:58 PST
> 
>   FreeBSD src repository
> 
>   Modified files:
>     sys/vm               vm_kern.c 
>   Log:
>   Don't panic if we fail to satisfy an M_WAITOK request; return 0 instead.
>   The calling code will either handle that gracefully or cause a page fault.
>   
>   Revision  Changes    Path
>   1.113     +2 -0      src/sys/vm/vm_kern.c

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?

I've generally opposed similar changes in Darwin because you end up
sprinkling hundreds (if not thousands) of calls to KASSERT() around the
kernel, as memory allocation suddenly becomes an operation that can fail
where previously it could not.  In FreeBSD, kmem_malloc() is not directly
consumed by the majority of the kernel, but it is indirectly consumed via
UMA...

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert@fledge.watson.org      Senior Research Scientist, McAfee Research




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1040216134648.63057L-100000>