Graceful failure instead of panicking in kmem_malloc

Bharma Ji bharmaji at gmail.com
Wed Jan 9 15:48:04 PST 2008


>Is there any way to make the system log and then gracefully shut off while
>guaranteeing that the logging/shutdown procedure won't also run out memory
>somewhere?
For logging procedure, I am hoping that by keeping some memory aside, I
should be able to guarantee that the procedure will not run out of memory.
For shutdown, I don't know. I am not sure if doing the usual shutdown is
even required.
To me this appears to be a generic requirement of any system i.e.
a) Set aside some memory to handle out of memory conditions. Establish a low
threshold
b) When the system reaches the low threshold,
   1) stop all processing (not sure right  now if this translates to
shutdown)
   2) record the error.

Kris
Thanks for sending the patch. The patch essentially will try to reclaim
memory 8 times before panicking. Is the understanding correct? If so, how
did you arrive at the number 8?

On Jan 9, 2008 9:30 AM, Mike <deathjestr at gmail.com> wrote:

> Bharma Ji wrote:
> > Is there any way to make the system log and then gracefully shut off
> instead
> > of panicking?
>
> Is there any way to make the system log and then gracefully shut off while
> guaranteeing that the logging/shutdown procedure won't also run out memory
> somewhere?
>


More information about the freebsd-hackers mailing list