Date: Wed, 9 Jan 2008 15:48:01 -0800 From: "Bharma Ji" <bharmaji@gmail.com> To: Mike <deathjestr@gmail.com>, kris@freebsd.org Cc: freebsd-hackers@freebsd.org Subject: Re: Graceful failure instead of panicking in kmem_malloc Message-ID: <67beabb0801091548p2b0bdf41m193a7a22c95411c4@mail.gmail.com> In-Reply-To: <44b564930801090930y3ce2014bldaa7e97402683ef7@mail.gmail.com> References: <67beabb0801081555v4ca3b729x294322fa724afa09@mail.gmail.com> <4784159E.9040905@FreeBSD.org> <67beabb0801081925t67f995b8hc4cc779f88c2ba@mail.gmail.com> <66462bcb31fb347796200bd5260d7cdc@gmail.com> <47849E42.7090201@FreeBSD.org> <44b564930801090930y3ce2014bldaa7e97402683ef7@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
>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@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? >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?67beabb0801091548p2b0bdf41m193a7a22c95411c4>