Re: Graceful failure instead of panicking in kmem_malloc

2008-01-09 Thread Bharma Ji
>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

Re: Graceful failure instead of panicking in kmem_malloc

2008-01-09 Thread Mike
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? _

Re: Graceful failure instead of panicking in kmem_malloc

2008-01-09 Thread Kris Kennaway
Joshua Isom wrote: On Jan 8, 2008, at 9:25 PM, Bharma Ji wrote: Thanks for the response. I am hoping to keep some memory aside specifically for handling out of memory allocation situations. Yes the real fix is to avoid out of memory allocation. Thanks for the patch. Will try that. As a first

Re: Graceful failure instead of panicking in kmem_malloc

2008-01-09 Thread Heiko Wundram (Beenic)
Am Mittwoch, 9. Januar 2008 10:29:43 schrieb Joshua Isom: > Why not try to take out some user processes? Going with a combination > of process priority and memory usage, it should at least be more > tolerable than a panic. Ahemm. No. That's not tolerable in real world conditions. Have you ever ha

Re: Graceful failure instead of panicking in kmem_malloc

2008-01-09 Thread Joshua Isom
On Jan 8, 2008, at 9:25 PM, Bharma Ji wrote: Thanks for the response. I am hoping to keep some memory aside specifically for handling out of memory allocation situations. Yes the real fix is to avoid out of memory allocation. Thanks for the patch. Will try that. As a first cut I am just t

Re: Graceful failure instead of panicking in kmem_malloc

2008-01-08 Thread Bharma Ji
Thanks for the response. I am hoping to keep some memory aside specifically for handling out of memory allocation situations. Yes the real fix is to avoid out of memory allocation. Thanks for the patch. Will try that. As a first cut I am just trying to handle failure gracefully. So asking again -

Re: Graceful failure instead of panicking in kmem_malloc

2008-01-08 Thread Kris Kennaway
Bharma Ji wrote: In FreeBSD 6_2, if kmem_malloc is unable to find space it panics. The relevant code is in vm_kern.c if ((flags & M_NOWAIT) == 0) panic("kmem_malloc(%ld): kmem_map too small: %ld total allocated", (long)size, (long)map->si

Graceful failure instead of panicking in kmem_malloc

2008-01-08 Thread Bharma Ji
In FreeBSD 6_2, if kmem_malloc is unable to find space it panics. The relevant code is in vm_kern.c if ((flags & M_NOWAIT) == 0) panic("kmem_malloc(%ld): kmem_map too small: %ld total allocated", (long)size, (long)map->size); Is there any