Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Oct 2014 18:35:29 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Ian Lepore <ian@FreeBSD.org>
Cc:        Terry Kennedy <TERRY@tmk.com>, freebsd-arch@freebsd.org
Subject:   Re: [rfc] Add boot-time warning messages to PAE kernels
Message-ID:  <20141013153529.GP2153@kib.kiev.ua>
In-Reply-To: <1413212507.12052.323.camel@revolution.hippie.lan>
References:  <01PDOI9M51BK0003PW@tmk.com> <1413212507.12052.323.camel@revolution.hippie.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Oct 13, 2014 at 09:01:47AM -0600, Ian Lepore wrote:
> On Mon, 2014-10-13 at 00:56 -0400, Terry Kennedy wrote:
> > [Inspired by an unrelated email conversation with jhb@]
> > 
> >   On the FreeBSD forums and also elsewhere, people frequently ask questions
> > about enabling PAE. Generally, this is because they don't know that amd64 
> > kernels will run on their hardware.
> > 
> >   I initially proposed a static warning message, similar to the ones that
> > happen when a kernel is built with INVARIANTS or WITNESS, with some sort
> > of warning that "You probably don't want to do this". On thinking it over
> > and discussing with jhb@, I think there are three scenarios that could be
> > addressed:
> > 
> >   1) Boot PAE kernel on any amd64-capable processor - display a warning
> >      message stating that the user should consider using the amd64 kernel
> >      instead.
> > 
> >   2) Boot PAE kernel on any processor - display a warning message that
> >      driver support is limited on PAE kernels and that they receive less
> >      testing than non-PAE kernels.
> > 
> >   3) [Possibly] Boot i386 kernel on amd64-capable system w/ > 4GB of RAM -
> >      display an informational message that the user should consider using
> >      the amd64 kernel instead.
> > 
> >   This way, anyone that still needs to run a PAE kernel can, but the users
> > who choose it by accident or mistake will be guided to the amd64 kernel.
> > Adding a similar message to i386 kernels on amd64-capable hardware w/ more
> > than 4GB of RAM will likewise direct those users toward a more optimal 
> > kernel. I mention this because I was having a conversation with a user who
> > was trying to get ZFS going but "ran out of memory" on a 12GB system due
> > to using the i386 kernel.
> > 
> >   All of this information (processor capability flags and memory size)
> > is available early enough in the boot process that the messages can be 
> > displayed near the beginning of the kernel messages.
> > 
> >   Non-amd64-capable systems that have > 4GB were always a small subset of
> > the population, and that hardware has aged enough that much of it is no
> > longer used in its original role as business servers. These are pre-Socket
> > 604 systems, for example. amd64-capable hardware has been available for
> > more than 10 years from both AMD and Intel at this point.
> > 
> >         Terry Kennedy             http://www.tmk.com
> >         terry@tmk.com             New York, NY USA
> 
> No no no no no.  People who are smart enough to build themselves a
> different kernel should not get their noses rubbed in your idea of
> what's right every time they boot.  I run a PAE kernel for my own
> reasons, and they are good reasons for me regardless of what you think
> about it.
I fully agree.  Usually Unix kernels are silent.  Starting to lecture
users what to do is not very smart.

PAE is the way to get NX bit on 32bit kernels.

> 
> And can we finally lose the mythology that PAE is somehow experimental
> or inadequate?  I've never encountered a driver that doesn't work with
> PAE (I'm sure they exist, but again, people smart enough to build a
> custom kernel should be smart enough to deal with testing it with the
> devices they use).

The real issue with PAE is that auto-tuning easily makes non-working
configuration due to small KVA (1 or 2 GB) comparing with the available
physical RAM installed on the machine.  It is more or less fine for 4GB
machine, but AFAIR, is on the edge for 8GB, and breaks afterward.
Lowering the user/kernel VA split helps somewhat.

The solution for PAE issues is to implement separate address space for
kernel.  It would add some overhead on each mode switch, but this is the
cost of being able to run what you need.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20141013153529.GP2153>