From owner-cvs-all Sat Dec 14 16:17:21 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7F82337B404; Sat, 14 Dec 2002 16:17:19 -0800 (PST) Received: from smtp04.iprimus.com.au (smtp04.iprimus.com.au [210.50.76.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id A992043EA9; Sat, 14 Dec 2002 16:17:17 -0800 (PST) (envelope-from tim@robbins.dropbear.id.au) Received: from smtp01.iprimus.net.au (210.50.30.70) by smtp04.iprimus.com.au (6.7.010) id 3DF583C300098D2E; Sun, 15 Dec 2002 11:17:11 +1100 Received: from dilbert.robbins.dropbear.id.au ([203.134.132.127]) by smtp01.iprimus.net.au with Microsoft SMTPSVC(5.0.2195.5600); Sun, 15 Dec 2002 11:17:09 +1100 Received: from dilbert.robbins.dropbear.id.au (15rwosiqpuie80pg@localhost [127.0.0.1]) by dilbert.robbins.dropbear.id.au (8.12.6/8.12.6) with ESMTP id gBF0HGgP041823; Sun, 15 Dec 2002 11:17:17 +1100 (EST) (envelope-from tim@dilbert.robbins.dropbear.id.au) Received: (from tim@localhost) by dilbert.robbins.dropbear.id.au (8.12.6/8.12.6/Submit) id gBF0HFPT041822; Sun, 15 Dec 2002 11:17:15 +1100 (EST) (envelope-from tim) Date: Sun, 15 Dec 2002 11:17:15 +1100 From: Tim Robbins To: phk@FreeBSD.org Cc: John Baldwin , Peter Wemm , cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_descrip.c Message-ID: <20021215111715.A41695@dilbert.robbins.dropbear.id.au> References: <23879.1039899652@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <23879.1039899652@critter.freebsd.dk>; from phk@FreeBSD.org on Sat, Dec 14, 2002 at 10:00:52PM +0100 X-OriginalArrivalTime: 15 Dec 2002 00:17:10.0459 (UTC) FILETIME=[4F5910B0:01C2A3CF] Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, Dec 14, 2002 at 10:00:52PM +0100, phk@FreeBSD.org wrote: > In message , John Baldwin writes: > > > >On 13-Dec-2002 Peter Wemm wrote: > >> "Tim J. Robbins" wrote: > >>> tjr 2002/12/13 01:59:40 PST > >>> > >>> Modified files: > >>> sys/kern kern_descrip.c > >>> Log: > >>> Drop filedesc lock and acquire Giant around calls to malloc() and free(). > >>> These call uma_large_malloc() and uma_large_free() which require Giant. > >>> Fixes panic when descriptor table is larger than KMEM_ZMAX bytes > >>> noticed by kkenn. > >> > >> What about things like geom which explicitly call malloc without Giant? > >> Or is it just a problem for large allocations? > > > >Just for large allocations which call uma_malloc_large(). > > Uhm, and just what is the magic size where this happens ? KMEM_ZMAX. The relevant code is in kern_malloc.c: 96 #define KMEM_ZMAX 65536 174 if (size <= KMEM_ZMAX) { ... 182 va = uma_zalloc(zone, flags); ... 189 } else { ... 192 va = uma_large_malloc(size, flags); Tim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message