Re: panic: kmem_malloc; Should I increase some setting?

From: Brian Fundakowski Feldman <green_at_freebsd.org>
Date: Tue, 29 Jun 2004 22:20:35 -0400
On Wed, Jun 30, 2004 at 03:35:07AM +0200, Ronald Klop wrote:
> On Tue, 29 Jun 2004 18:22:57 -0700 (PDT), Doug White  
> <dwhite_at_gumbysoft.com> wrote:
> 
> >On Wed, 30 Jun 2004, Ronald Klop wrote:
> >
> >>I get the following panics while untarring a 30MB archive on an md  
> >>device
> >>create with:
> >>tmpmfs="YES"
> >>tmpsize="256m"
> >
> >This is a malloc-backed md disk, which consumes memory directly from KVM.
> >If you do a large extraction it will consume all of KVM and cause your
> >panic.  Unless you're running diskless and this is your only option
> >besides NFS, either don't use tmpmfs or avoid extracting large amounts of
> >data to /tmp.
> 
> Thanks, I read this a few moments ago in the manual page.
> Isn't there a way to prevent or warn people when they create a malloc  
> backed disk that is larger than KVM? I think a panic isn't very user  
> friendly and it took me quite some time to figure this out.

The problem is that it's not instantiated immediately (as you well found
out), so warning isn't quite as simple.  I think a simpler check is to
warn if allocating more than a certain %age of the system memory.

-- 
Brian Fundakowski Feldman                           \'[ FreeBSD ]''''''''''\
  <> green_at_FreeBSD.org                               \  The Power to Serve! \
 Opinions expressed are my own.                       \,,,,,,,,,,,,,,,,,,,,,,\
Received on Wed Jun 30 2004 - 00:20:39 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:59 UTC