From owner-freebsd-arch@FreeBSD.ORG Thu Nov 11 17:29:02 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 819ED16A4D1 for ; Thu, 11 Nov 2004 17:29:02 +0000 (GMT) Received: from mail2.speakeasy.net (mail2.speakeasy.net [216.254.0.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F81F43D39 for ; Thu, 11 Nov 2004 17:29:02 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 2224 invoked from network); 11 Nov 2004 17:29:01 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 11 Nov 2004 17:29:01 -0000 Received: from [10.50.41.235] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id iABHSv7d044497; Thu, 11 Nov 2004 12:28:57 -0500 (EST) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-arch@FreeBSD.org Date: Thu, 11 Nov 2004 12:28:18 -0500 User-Agent: KMail/1.6.2 References: <20041111030035.GA70923@VARK.MIT.EDU> In-Reply-To: <20041111030035.GA70923@VARK.MIT.EDU> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200411111228.19044.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: arch@FreeBSD.org cc: David Schultz Subject: Re: U Area Removal X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Nov 2004 17:29:02 -0000 On Wednesday 10 November 2004 10:00 pm, David Schultz wrote: > Over the years, the amount of data we have stored in each process' U > area has eroded to the point where all we have left are the following: > > - A struct kinfo_proc that is only used for a.out core dumps. > This can be reconstructed at the time of the core dump, so > it doesn't need to be there. > > - The struct pstats for the process, which takes a mere 216 bytes > on i386. > > In exchange for the ability to swap out this 216-byte structure, we > keep around a 4096-byte page, a 132-byte vm_object, and a couple of > pointers. Moreover, there is a small amount of runtime overhead > associated with this, and developers need to remember to PHOLD() and > PRELE() the process as appropriate.[1] > > I propose to remove the ability to swap the U area, allocating p_stats > from malloced memory instead. Medium-term scheduling and swapping of > kernel stacks would be retained. Here are the patches; !i386 testers > wanted: > > http://www.freebsd.org/~das/patches/upages.diff > > > [1] Most of the instances of PHOLD() and PRELE() right now never > needed to be there or have been unnecessary ever since the PCB > was moved out of the U area. Yay! Two notes: +struct pstats * +pstats_alloc(void) +{ + + return (malloc(sizeof(struct plimit), M_SUBPROC, M_ZERO|M_WAITOK)); +} I think you mean s/plimit/pstats/ there. Secondly: /* - * Per process structure containing data that isn't needed in core - * when the process isn't running (esp. when swapped out). + * Formerly the per-process structure containing data that isn't needed + * in core when the process is swapped out, this structure remains only + * for the benefit of a.out core dumps. */ s/out, this/out. This/ It's a whole new sentence. :) -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org