cvs commit: src/sys/vm vm_kern.c
Robert Watson
rwatson at FreeBSD.org
Mon Feb 16 10:56:21 PST 2004
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 at fledge.watson.org Senior Research Scientist, McAfee Research
More information about the cvs-src
mailing list