From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 9 00:23:00 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5838216A421 for ; Wed, 9 Jan 2008 00:23:00 +0000 (UTC) (envelope-from bharmaji@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.154]) by mx1.freebsd.org (Postfix) with ESMTP id EAD8513C44B for ; Wed, 9 Jan 2008 00:22:59 +0000 (UTC) (envelope-from bharmaji@gmail.com) Received: by fg-out-1718.google.com with SMTP id 16so28255fgg.35 for ; Tue, 08 Jan 2008 16:22:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=Z45RPgi3a4ufy0A/XtilyDkTgGxun1ldLk52IU5Vwfs=; b=uzb0hG7Tgj+JckzHa7qIzEyDpHI6ldI+WkEP0ShU+AUqGPq/5hF11s51z1LtYF8h89ksjvjBVhYOMeyvmNrq1HUyQL5tKD4VMIJHd9c/vF8hPgx3RNsBQsY3PbSZKuEbVTKtqdv5uiiJKRBu+8OrR/H63co7sJEDioSXo8GrBXE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=c7TF+sOTI6fo0YgV37ILTLOmLl/oH/f1tSlh6Hw0HTH0HRRySXMIgfKgBTW8uABefQzNvCVkZgfWCMWt6TwY95ffdilmFVmkvtksfjZzSA9nUVzoLorPB3VTtbNGHtvWCWRP4vrR4AJ0jNSWExo7Colz4d+ckVBEFrK8mQgF6d0= Received: by 10.78.201.10 with SMTP id y10mr33847huf.11.1199836558881; Tue, 08 Jan 2008 15:55:58 -0800 (PST) Received: by 10.78.130.18 with HTTP; Tue, 8 Jan 2008 15:55:58 -0800 (PST) Message-ID: <67beabb0801081555v4ca3b729x294322fa724afa09@mail.gmail.com> Date: Tue, 8 Jan 2008 15:55:58 -0800 From: "Bharma Ji" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Graceful failure instead of panicking in kmem_malloc X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2008 00:23:00 -0000 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 way to make the system log and then gracefully shut off instead of panicking?