From owner-freebsd-arch@FreeBSD.ORG Wed Aug 13 14:45:26 2008 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 341041065683; Wed, 13 Aug 2008 14:45:26 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from agogare.doit.wisc.edu (agogare.doit.wisc.edu [144.92.197.211]) by mx1.freebsd.org (Postfix) with ESMTP id B48158FC21; Wed, 13 Aug 2008 14:45:25 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=ISO-8859-1; format=flowed Received: from avs-daemon.smtpauth2.wiscmail.wisc.edu by smtpauth2.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 6.3-6.03 (built Mar 14 2008; 32bit)) id <0K5J00B0AKVOWU00@smtpauth2.wiscmail.wisc.edu>; Wed, 13 Aug 2008 08:45:24 -0500 (CDT) Received: from trantor.tachypleus.net (adsl-75-42-235-192.dsl.mdsnwi.sbcglobal.net [75.42.235.192]) by smtpauth2.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 6.3-6.03 (built Mar 14 2008; 32bit)) with ESMTPSA id <0K5J00M9BKVJJH80@smtpauth2.wiscmail.wisc.edu>; Wed, 13 Aug 2008 08:45:20 -0500 (CDT) Date: Wed, 13 Aug 2008 08:48:26 -0500 From: Nathan Whitehorn In-reply-to: <200808051024.27043.jhb@freebsd.org> To: John Baldwin Message-id: <48A2E62A.9060604@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=75.42.235.192 X-Spam-PmxInfo: Server=avs-9, Version=5.4.1.325704, Antispam-Engine: 2.6.0.325393, Antispam-Data: 2008.8.13.132817, SenderIP=75.42.235.192 References: <48981C19.8060009@freebsd.org> <200808051024.27043.jhb@freebsd.org> User-Agent: Thunderbird 2.0.0.14 (X11/20080628) Cc: freebsd-arch@freebsd.org Subject: Re: UMA MD Small Allocator Runtime Switching X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2008 14:45:26 -0000 John Baldwin wrote: > On Tuesday 05 August 2008 05:23:37 am Nathan Whitehorn wrote: >> I'm working on the PowerPC G5 port right now, and have run into a >> problem with the way the UMA small allocator works. On G3/G4 systems, >> there is a direct physical->virtual mapping, and on G5s there isn't. All >> of the infrastructure is in place to support both types of system with a >> single kernel image, except that UMA_MD_SMALL_ALLOC must be switched >> on/off at runtime. >> >> One solution is to put if (direct_map) use_nonsmall_case() into the MD >> small_alloc/free() routines and define UMA_MD_SMALL_ALLOC everywhere. >> This works well, except that the MI UMA code then sets booted = 1 too >> early in the boot process, before the kmem_alloc*() routines are available. >> >> Basically, I need to find a way have an MD UMA allocator without the MI >> UMA code assuming anything about how it works internally. Maybe adding a >> UMA_MD_ALLOC_LATE define to prevent setting booted=1 early on? >> -Nathan > > Have you considered creating an artificial direct map region in the address > space on the G5? Some of the other 64-bit ports (amd64 and sparc64) do this > to gain the benefits of the direct map even though it isn't a mandated part > of the architecture like it is on some other platforms (alpha and mips). I thought about it, but we can only use 4K pages on the G5 so this would put a large amount of pressure on the page table. IBM removed the block translation mechanism from the G5 and the CPU's superpage support is not available in the 32-bit compatibility mode under which we currently run. -Nathan