Status of NX bit support.

Oliver Fromme olli at lurza.secnetix.de
Tue Apr 4 08:55:07 UTC 2006


Mike Jakubik <mikej at rogers.com> wrote:
 > John Baldwin wrote:
 > > On Sunday 02 April 2006 14:48, Mike Jakubik wrote:
 > > > I was wondering what the status of the NX bit support is. Is the pmap.c 
 > > > code still broken or is support enabled and functioning by default?
 > > 
 > > I don't think the status has changed.
 > 
 > Well that sucks.. I guess then there really is no reason for someone to 
 > run in amd64 mode unless you need more than 4GB of ram.

Rather:  Unless you need more than 32 bit of address space.
That's a significant difference.  You can take advantage
of the 64 bit address space even if you don't have more
than 4 GB of RAM.  On the other hand, if you only need
more than 4 GB of RAM, but don't require a larger address
space, you could run in 32 bits with PAE enabled (although
that's a crutch which I'd rather avoid).

Apart from that, in 64 bit mode there are more registers
available, which gcc takes advantage of to generate more
efficient code.  However, on the other hand, the additional
registers also have to be saved and restored upon context
switches, which costs CPU cycles.  Also, long data types
take up more memory, which can reduce cache efficiency.

Whether a specific usage benfits from 64 bit mode (in terms
of performance) needs to be checked by benchmarking it, and
then deciding whether FreeBSD/i386 or FreeBSD/amd64 should
be used.  Of course, there are cases where you don't have a
choice:  If software is required which hasn't been ported
to 64bit, you're stuck with /i386.  If you need more than
32 bit of address space, you must use /amd64.  If you need
both, you're out of luck.  :-)

As you can see, there are quite a lot of advantages and
disadvantages to both /i386 and /amd64 (and I've certainly
missed a few).  The NX bit and the 4 GB barrier aren't the
only ones by far.

Best regards
   Oliver

-- 
Oliver Fromme,  secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"Emacs ist für mich kein Editor. Für mich ist das genau das gleiche, als
wenn ich nach einem Fahrrad (für die Sonntagbrötchen) frage und einen
pangalaktischen Raumkreuzer mit 10 km Gesamtlänge bekomme. Ich weiß nicht,
was ich damit soll." -- Frank Klemm, de.comp.os.unix.discussion


More information about the freebsd-amd64 mailing list