From owner-freebsd-arch@FreeBSD.ORG Fri Mar 19 20:20:50 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 668131065672 for ; Fri, 19 Mar 2010 20:20:50 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 35E4A8FC13 for ; Fri, 19 Mar 2010 20:20:50 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id B0D0646B38; Fri, 19 Mar 2010 16:20:49 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id EA4038A01F; Fri, 19 Mar 2010 16:20:48 -0400 (EDT) From: John Baldwin To: Scott Long Date: Fri, 19 Mar 2010 16:20:29 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <4BA2CE17.2050105@delphij.net> <4BA3C41F.3000404@elischer.org> <5BED0721-442C-44B3-8B23-3D94BE5354A9@samsco.org> In-Reply-To: <5BED0721-442C-44B3-8B23-3D94BE5354A9@samsco.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201003191620.29912.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 19 Mar 2010 16:20:48 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.7 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: d@delphij.net, Julian Elischer , freebsd-arch@freebsd.org Subject: Re: [PATCH] Utilize i686, SSE and MMX by default on FreeBSD/i386 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 20:20:50 -0000 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