From owner-freebsd-stable@FreeBSD.ORG Sat Nov 11 17:53:39 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0176B16A47C for ; Sat, 11 Nov 2006 17:53:38 +0000 (UTC) (envelope-from ohartman@mail.zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6E2EA43D6A for ; Sat, 11 Nov 2006 17:53:36 +0000 (GMT) (envelope-from ohartman@mail.zedat.fu-berlin.de) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.62) with esmtp (envelope-from ) id <1Gix2p-0004FP-RA>; Sat, 11 Nov 2006 18:53:31 +0100 Received: from e178002185.adsl.alicedsl.de ([85.178.2.185] helo=[192.168.1.128]) by inpost2.zedat.fu-berlin.de (Exim 4.62) with esmtpsa (envelope-from ) id <1Gix2p-00004u-OZ>; Sat, 11 Nov 2006 18:53:31 +0100 Message-ID: <45560E17.6070306@mail.zedat.fu-berlin.de> Date: Sat, 11 Nov 2006 18:53:27 +0100 From: "O. Hartmann" User-Agent: Thunderbird 1.5.0.8 (X11/20061110) MIME-Version: 1.0 To: Daniel O'Connor References: <4554D43E.5010700@highperformance.net> <20061110222434.GA76724@icarus.home.lan> <200611111019.43944.doconnor@gsoft.com.au> In-Reply-To: <200611111019.43944.doconnor@gsoft.com.au> X-Enigmail-Version: 0.94.1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Originating-IP: 85.178.2.185 Cc: freebsd-stable@freebsd.org Subject: Re: Compiler Options X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Nov 2006 17:53:39 -0000 Daniel O'Connor wrote: > On Saturday 11 November 2006 08:54, Jeremy Chadwick wrote: > >> The kernel itself _will not_ use any SSE or MMX operations when built. >> This is because these optimisations are known to break the FreeBSD >> kernel. This applies to all i386 architectures, and probably 64-bit >> architectures too (not sure). >> > > I think this is mainly because the kernel has no FPU context so you can't > actually use any FPU operation (including SSE & MMX) without potentially > trashing userland data. > This is a good question to ask why. Still a relict from FreeBSDs BSD4.4 legacy root? > Also, the cost of saving/restoring the context is quite high so potential > benefits are largely negated. > Well, this is often subject of lectures even at universities today and even it is so, modern hardware design should be aware of those disadvantages. Ans this leads to the question whether this is in FreeBSD so because it is really still a disadvantage (what I do not believe, even on i386 hardware) or it is said to be so due to nobody has taken care about that. As I remember myself, modern Linux kernels use MMX/SSE registers even for purposes of getting an advantage in speed. > (I could be wrong but the above is what I remember reading on various lists > over the years :) > Yes, over the years ... Regards, Oliver