From owner-freebsd-arch@FreeBSD.ORG Fri Nov 12 01:01:58 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 C2D7716A4CE; Fri, 12 Nov 2004 01:01:58 +0000 (GMT) Received: from VARK.MIT.EDU (VARK.MIT.EDU [18.95.3.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7490E43D2D; Fri, 12 Nov 2004 01:01:58 +0000 (GMT) (envelope-from das@FreeBSD.ORG) Received: from VARK.MIT.EDU (localhost [127.0.0.1]) by VARK.MIT.EDU (8.13.1/8.12.10) with ESMTP id iAC126h9006869; Thu, 11 Nov 2004 20:02:06 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.MIT.EDU (8.13.1/8.12.10/Submit) id iAC126Ir006868; Thu, 11 Nov 2004 20:02:06 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Thu, 11 Nov 2004 20:02:06 -0500 From: David Schultz To: Scott Long Message-ID: <20041112010206.GA6657@VARK.MIT.EDU> Mail-Followup-To: Scott Long , arch@FreeBSD.ORG References: <20041111030035.GA70923@VARK.MIT.EDU> <41940142.2040401@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41940142.2040401@freebsd.org> cc: arch@FreeBSD.ORG 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: Fri, 12 Nov 2004 01:01:58 -0000 On Thu, Nov 11, 2004, Scott Long wrote: > >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. > > > This breaks amd64 in bad ways on boot. I'll send a trace and more info > when I get a serial console hooked up. The bug jhb mentioned may be responsible for this: | +struct pstats * | +pstats_alloc(void) | +{ | + | + return (malloc(sizeof(struct plimit), M_SUBPROC, M_ZERO|M_WAITOK)); | +} | | I think you mean s/plimit/pstats/ there. On 32-bit architectures, sizeof(struct plimit) is 184 bytes and sizeof(struct pstats) is 216 bytes, so requests for either would get a 256-byte allocation and things work fine. But on 64-bit architectures, sizeof(struct plimit) is 192 bytes and sizeof(struct pstats) is 432 bytes... In any case, I've updated the patch to correct this cut-and-paste-o.