[PATCH] Utilize i686, SSE and MMX by default on FreeBSD/i386
John Baldwin
jhb at freebsd.org
Fri Mar 19 20:20:50 UTC 2010
On Friday 19 March 2010 2:53:45 pm Scott Long wrote:
>
> On Mar 19, 2010, at 12:36 PM, Julian Elischer wrote:
>
> > John Baldwin wrote:
> >> On Thursday 18 March 2010 9:06:31 pm Xin LI wrote:
> >>> Hi,
> >>>
> >>> I think it doesn't really make sense to by default use MACHINE_CPU=i486
> >>> when the kernel is built with SSE by default today.
> >>>
> >>> Attached patch uses i686 SSE MMX by default, the user can always change
> >>> the default setting by overriding CPUTYPE (they have to do it as SSE is
> >>> enabled by default for several years).
> >> The kernel is only built with support for userland applications using
SSE, it does not _use_ SSE. Similarly, the kernel is built with support for
PG_NX provided on 64-bit processors, but it does not do so by failing to
support older 32-bit processors. I think this change is premature. Users can
already set CPUTYPE in make.conf. Also, most modern x86 server-class machines
are
> >> 64-bit in which case they would be running FreeBSD/amd64 and using SSE
> >> already.
> >
> >
> > and a lot of low power boxes (e.g. soekris) are 586 class.
> >
>
> Are these machines typically installed via a GENERIC kernel from freebsd.org
release CD's? Maybe there's a market to create a new mini-distribution
tailored for these devices. It would come with a suitable kernel and
install/setup tools.
Supporting 486/586 in the kernel doesn't actually cost anything. We don't
use SSE (except in a few isolated cases) in the kernel already because of the
overhead that would be required to manage a separate FPU context for the
kernel (it would severely impact the performance of all context switches as
well as all user <--> kernel transitions such as interrupts, traps, etc. if
we were to make widespread use of SSE). This is why we use -no-sse for the
kernel compile even on amd64 where we know for certain that all supported CPUs
support SSE. There really isn't a compelling reason to drop 486/586 support
from GENERIC.
--
John Baldwin
More information about the freebsd-arch
mailing list