From owner-freebsd-stable@FreeBSD.ORG Sun Dec 14 18:53:12 2014 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF5C517A; Sun, 14 Dec 2014 18:53:12 +0000 (UTC) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id DCE44FED; Sun, 14 Dec 2014 18:53:12 +0000 (UTC) Received: from [10.0.1.20] (c-76-21-10-192.hsd1.ca.comcast.net [76.21.10.192]) by elvis.mu.org (Postfix) with ESMTPSA id 4EE0E341F84F; Sun, 14 Dec 2014 10:53:12 -0800 (PST) Subject: Re: i386 PAE kernel works fine on 10-stable Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=windows-1252 From: Alfred Perlstein In-Reply-To: <1418580756.2026.12.camel@freebsd.org> Date: Sun, 14 Dec 2014 10:53:14 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <847BD158-0867-4F5F-83A9-1651E77D29EF@mu.org> References: <1418579278.2026.9.camel@freebsd.org> <1418580756.2026.12.camel@freebsd.org> To: Ian Lepore X-Mailer: Apple Mail (2.1283) Cc: FreeBSD Stable X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2014 18:53:13 -0000 On Dec 14, 2014, at 10:12 AM, Ian Lepore wrote: > On Sun, 2014-12-14 at 10:09 -0800, Alfred Perlstein wrote: >> On Dec 14, 2014, at 9:47 AM, Ian Lepore wrote: >>=20 >>> This is an out of the blue FYI post to let people know that despite = all >>> the misinformation you'll run across if you search for information = on >>> FreeBSD PAE support, it (still) works just fine. I've been using it >>> (for reasons related to our build system and products at $work) = since >>> 2006, and I can say unequivocally that it works fine on 6.x, 8.x, = and >>> now 10.x (and presumably on the odd-numbered releases too but I've = never >>> tried those). >>>=20 >>> In my most recent testing with 10-stable, I found it was compatible = with >>> drm2 and radeonkms drivers and I was able to run Xorg and gnome just >>> fine. All my devices, and apps, and even the linuxulator worked = just >>> fine. >>>=20 >>> One thing that changed somewhere between 8.4 and 10.1 is that I had = to >>> add a kernel tuning option to my kernel config: >>>=20 >>> option KVA_PAGES=3D768 # Default is 512 >>>=20 >>> I suspect that the most frequent use of PAE is on laptops that have = 4gb >>> and the default tuning is adequate for that. My desktop machine has >>> 12gb and I needed to bump up that value to avoid errors related to = being >>> unable to create new kernel stacks. >>>=20 >>=20 >> There already is a #define that is bifurcated based on PAE in pmap.h: >>=20 >> #ifndef KVA_PAGES >> #ifdef PAE >> #define KVA_PAGES 512 >> #else >> #define KVA_PAGES 256 >> #endif >> #endif >>=20 >> Do you think it will harm things to apply your suggested default to = this file? >>=20 >=20 > I would have to defer to someone who actually understands just what = that > parm is tuning. It was purely speculation on my part that the current > default is adequate for less memory than I have, and I don't know what > that downside might be for setting it too high. >=20 KVA pages is the amount of pages reserved for kernel address space: * Size of Kernel address space. This is the number of page table pages * (4MB each) to use for the kernel. 256 pages =3D=3D 1 Gigabyte. * This **MUST** be a multiple of 4 (eg: 252, 256, 260, etc). * For PAE, the page table page unit size is 2MB. This means that 512 = pages * is 1 Gigabyte. Double everything. It must be a multiple of 8 for = PAE. It appears that our default for PAE leaves 1GB for kernel address to = play with? That's an interesting default. Wonder if it really makes = sense for PAE since the assumption is that you'll have >4GB ram in the = box, wiring down 1.5GB for kernel would seem to make sense=85 Probably = make sense to ask Peter or Alan on this. Also wondering how bad it would be to make these tunables, I see they = trickle down quite a bit into the system, hopefully not defining some = static arrays, but I haven't dived down that far. Ian, just to understand better, how much memory is in your machine? -Alfred