From owner-freebsd-smp Fri Jul 12 1: 7:46 2002 Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 99D3937B400 for ; Fri, 12 Jul 2002 01:07:44 -0700 (PDT) Received: from mta7.pltn13.pbi.net (mta7.pltn13.pbi.net [64.164.98.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 30C9D43E4A for ; Fri, 12 Jul 2002 01:07:44 -0700 (PDT) (envelope-from mtm@pacbell.net) Received: from kokeb.ambesa.net ([64.173.11.248]) by mta7.pltn13.pbi.net (iPlanet Messaging Server 5.1 (built May 7 2001)) with ESMTP id <0GZ400HQIMKVHB@mta7.pltn13.pbi.net> for freebsd-smp@FreeBSD.ORG; Fri, 12 Jul 2002 01:07:43 -0700 (PDT) Received: from kokeb.ambesa.net (tanstaafl@localhost [IPv6:::1]) by kokeb.ambesa.net (8.12.5/8.12.5) with ESMTP id g6C87YaU020765; Fri, 12 Jul 2002 01:07:34 -0700 (PDT envelope-from mtm@kokeb.ambesa.net) Received: (from mtm@localhost) by kokeb.ambesa.net (8.12.5/8.12.5/Submit) id g6C87YWj020764; Fri, 12 Jul 2002 01:07:34 -0700 (PDT) Date: Fri, 12 Jul 2002 01:07:34 -0700 From: Mike Makonnen Subject: Re: Getting resource limits out from under Giant In-reply-to: <20020710042149.26b39b62.makonnen@pacbell.net> To: Mike Makonnen Cc: freebsd-smp@FreeBSD.ORG Message-id: <20020712010734.40b40b77.makonnen@pacbell.net> MIME-version: 1.0 X-Mailer: Sylpheed version 0.7.8 (GTK+ 1.2.10; i386-portbld-freebsd5.0) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT References: <20020710042149.26b39b62.makonnen@pacbell.net> Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Wed, 10 Jul 2002 04:21:49 -0700 Mike Makonnen wrote: > Hello folks, > > I took a stab at getting resource limits out from under Giant. > The patch is at http://home.pacbell.net/makonnen/limits.giant.patch > > Comments? Ok, I've broken it down into 3 separate diffs. http://home.pacbell.net/makonnen/limits.tar.gz 1. Touches sys/resourcevar.h - add a mutex to struct plimit - define 2 macros: LIM_LOCK and LIM_UNLOCK Touches kern/kern_resource.c - add 3 functions: limget(), limhold(), limfree() - modify limcopy() to take two arguments, the new and the old plimits structure. 2. Touches users of resource limits - These are exit1(), fork1(), proc0_init(), and acct_process() 3. Actually removes lock/unlock of Giant, and GIANT_REQUIRED Cheers, Mike Makonnen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message