tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kernel memory allocation failures



Chuck Silvers <chuq%chuq.com@localhost> writes:

> how about instead we fix the kmem_alloc() implementation to match the man page?
> that seems much more practical to me.  adding failure checks and recovery code
> to the thousands of *alloc() calls in the kernel would be a vast amount of work
> for very little benefit.  an attempt to allocate an amount of memory large
> enough that it can never succeed sounds like a bug to me, and it seems better
> to fix any such bugs rather than add a vast amount of mostly useless
> error handling code in hopes of papering over them.

That sounds sensible, but it would seem to require defining some 'small
enough that it cannot fail' size, either statically or via some
getconf-like interface, so that code is only relieved of the obligation
to check if the size is below the limit.   Then kernels that can't
enforce that limit have to panic at boot.   Did you mean all that, or
something else?

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index