Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Mar 2010 16:20:29 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Scott Long <scottl@samsco.org>
Cc:        d@delphij.net, Julian Elischer <julian@elischer.org>, freebsd-arch@freebsd.org
Subject:   Re: [PATCH] Utilize i686, SSE and MMX by default on FreeBSD/i386
Message-ID:  <201003191620.29912.jhb@freebsd.org>
In-Reply-To: <5BED0721-442C-44B3-8B23-3D94BE5354A9@samsco.org>
References:  <4BA2CE17.2050105@delphij.net> <4BA3C41F.3000404@elischer.org> <5BED0721-442C-44B3-8B23-3D94BE5354A9@samsco.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



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