On Dec 11,  8:54am, c...@chuq.com (Chuck Silvers) wrote:
-- Subject: Re: kernel memory allocation failures

| I haven't looked see exactly what the internal conditions are that lead to
| kmem_alloc(KM_SLEEP) returning NULL, so it's not clear whether having
| kmem_alloc() retry or panic in that situation would be better.
| but either of those would be better than adding code to all the callers.

    http://nxr.netbsd.org/xref/src/sys/kern/subr_vmem.c#256

Where we are calling the pool code with PR_NOWAIT and the flags are not paid
attention to at all (except in the recursive calls).

And there is also:

    http://nxr.netbsd.org/xref/src/sys/kern/subr_vmem.c#272

where the 3 bt_refill() calls are not even being checked (but at least
they use flags :-)

bt_refill
bt_add
vmem_xalloc
vmem_alloc
uvm_km_kmem_alloc
kmem_intr_alloc
kmem_alloc

Anyway...

christos

Reply via email to