From owner-freebsd-current@FreeBSD.ORG Wed Jun 30 02:20:39 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from green.homeunix.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 679A816A51C; Wed, 30 Jun 2004 02:20:38 +0000 (GMT) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.12.11/8.12.11) with ESMTP id i5U2KbJe018947; Tue, 29 Jun 2004 22:20:37 -0400 (EDT) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.12.11/8.12.11/Submit) id i5U2KaHg018936; Tue, 29 Jun 2004 22:20:36 -0400 (EDT) (envelope-from green) Date: Tue, 29 Jun 2004 22:20:35 -0400 From: Brian Fundakowski Feldman To: Ronald Klop Message-ID: <20040630022035.GB946@green.homeunix.org> References: <20040629182027.I54069@carver.gumbysoft.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i cc: current@freebsd.org Subject: Re: panic: kmem_malloc; Should I increase some setting? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2004 02:20:39 -0000 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 > 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@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\