From owner-p4-projects@FreeBSD.ORG Thu Nov 20 18:22:46 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EDA541065675; Thu, 20 Nov 2008 18:22:45 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B22C5106564A for ; Thu, 20 Nov 2008 18:22:45 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from adsum.doit.wisc.edu (adsum.doit.wisc.edu [144.92.197.210]) by mx1.freebsd.org (Postfix) with ESMTP id 826E88FC1A for ; Thu, 20 Nov 2008 18:22:45 +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.smtpauth1.wiscmail.wisc.edu by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 6.3-6.03 (built Mar 14 2008; 32bit)) id <0KAN00J089PW1E00@smtpauth1.wiscmail.wisc.edu> for perforce@freebsd.org; Thu, 20 Nov 2008 12:22:44 -0600 (CST) Received: from sark.icecube.wisc.edu ([128.104.34.126]) by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 6.3-6.03 (built Mar 14 2008; 32bit)) with ESMTPSA id <0KAN00CT69PHL350@smtpauth1.wiscmail.wisc.edu>; Thu, 20 Nov 2008 12:22:39 -0600 (CST) Date: Thu, 20 Nov 2008 12:49:19 -0600 From: Nathan Whitehorn In-reply-to: <1DD739B8-6D48-49DC-8BAC-299D9AD9FC4C@mac.com> To: Marcel Moolenaar Message-id: <4925B12F.5040909@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=128.104.34.126 X-Spam-PmxInfo: Server=avs-9, Version=5.4.1.325704, Antispam-Engine: 2.6.0.325393, Antispam-Data: 2008.11.20.181321, SenderIP=128.104.34.126 References: <200811201707.mAKH7dcT045326@repoman.freebsd.org> <1DD739B8-6D48-49DC-8BAC-299D9AD9FC4C@mac.com> User-Agent: Thunderbird 2.0.0.9 (X11/20080211) Cc: Perforce Change Reviews Subject: Re: PERFORCE change 153267 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Nov 2008 18:22:46 -0000 Marcel Moolenaar wrote: > > On Nov 20, 2008, at 9:07 AM, Nathan Whitehorn wrote: > >> http://perforce.freebsd.org/chv.cgi?CH=153267 >> >> Change 153267 by nwhitehorn@nwhitehorn_trantor on 2008/11/20 17:07:25 >> >> Make ofw_real work on kernels with options SMP by making the bounce >> page static. On SMP systems, we can get OF calls after the MMU is on >> but before the VM is up. This means contigmalloc() is not available. >> This is not a good solution, but I can't think of anything else. > > You can grab pages by adjusting phys_avail. This achieves > pretty much the same, but avoids bloating the kernel. If > it's possible to give those pages back to the VM after the > VM has been initialized, then that would be another > benefit... The trouble with doing things like this is that the OF access code can be called at unpredictable times, so it may not be called between the time the MMU turns on (and phys_avail is created), and when the VM has taken ownership of phys_avail. It then needs knowledge of how far along it is in the boot process in much more detail than !pmap_bootstrapped in order to determine exactly what it is allowed to do at that time. An alternative is that the MMU init code could allocate the page, but it then needs to know about the internals of the OF access, which I would like to avoid. I suppose we could checkpoint this with some sysinits bracketed around the VM system, but that starts getting ugly. It might be the only way to proceed that doesn't bloat the kernel, though. -Nathan