From owner-freebsd-arch@FreeBSD.ORG Tue Aug 5 18:58:20 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 C7A6E10656A1; Tue, 5 Aug 2008 18:58:20 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 3FCB48FC23; Tue, 5 Aug 2008 18:58:20 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.2/8.14.2) with ESMTP id m75IwA2U094551; Tue, 5 Aug 2008 14:58:11 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-arch@freebsd.org Date: Tue, 5 Aug 2008 10:24:25 -0400 User-Agent: KMail/1.9.7 References: <48981C19.8060009@freebsd.org> In-Reply-To: <48981C19.8060009@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808051024.27043.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Tue, 05 Aug 2008 14:58:11 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/7946/Tue Aug 5 13:44:22 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.3 required=4.2 tests=AWL,BAYES_00, DATE_IN_PAST_03_06,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Nathan Whitehorn 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: Tue, 05 Aug 2008 18:58:20 -0000 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). -- John Baldwin