From owner-freebsd-hardware@FreeBSD.ORG Mon Dec 29 12:47:28 2003 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4639216A4CE for ; Mon, 29 Dec 2003 12:47:28 -0800 (PST) Received: from smtp3.sentex.ca (smtp3.sentex.ca [64.7.153.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id 00B5843D2D for ; Mon, 29 Dec 2003 12:47:26 -0800 (PST) (envelope-from damian@sentex.net) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by smtp3.sentex.ca (8.12.10/8.12.10) with ESMTP id hBTKk5HF094049; Mon, 29 Dec 2003 15:46:05 -0500 (EST) (envelope-from damian@sentex.net) Received: from pegmatite.sentex.ca (pegmatite.sentex.ca [192.168.42.92]) by lava.sentex.ca (8.12.9p2/8.12.9) with ESMTP id hBTKk8Xv034180; Mon, 29 Dec 2003 15:46:08 -0500 (EST) (envelope-from damian@sentex.net) Received: by pegmatite.sentex.ca (Postfix, from userid 1001) id 31DDD171BA; Mon, 29 Dec 2003 15:46:08 -0500 (EST) Date: Mon, 29 Dec 2003 15:46:07 -0500 From: Damian Gerow To: admin@forkthepenguin.com Message-ID: <20031229204607.GA838@sentex.net> References: <20031229190146.GR883@sentex.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-GPG-Key-Id: 0xB841F142 X-GPG-Fingerprint: C7C1 E1D1 EC06 7C86 AF7C 57E6 173D 9CF6 B841 F142 X-Habeas-SWE-1: winter into spring X-Habeas-SWE-2: brightly anticipated X-Habeas-SWE-3: like Habeas SWE (tm) X-Habeas-SWE-4: Copyright 2002 Habeas (tm) X-Habeas-SWE-5: Sender Warranted Email (SWE) (tm). The sender of this X-Habeas-SWE-6: email in exchange for a license for this Habeas X-Habeas-SWE-7: warrant mark warrants that this is a Habeas Compliant X-Habeas-SWE-8: Message (HCM) and not spam. Please report use of this X-Habeas-SWE-9: mark in spam to . User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-new cc: freebsd-hardware@freebsd.org Subject: Re: Kernel Optimizations for Processors X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2003 20:47:28 -0000 Thus spake admin@forkthepenguin.com (admin@forkthepenguin.com) [29/12/03 15:20]: > > There's been a number of discussions about this over the past few months. > > Take a quick peak through the archives. > > I looked through the archives using the search on the FreeBSD site, and > Google (summaries are nice to have) and I didn't see a whole lot on this. > Perhaps I'm just using the wrong search terms or getting too many false > positives. Try looking for my e-mail address. > > In short: the GCC folk (at least for 2.95.x) assume that a 686-compatible > > chip understands CMOV. *Some* of the C3 cores understand it, others do not. > > I was under the impression that the Samuel2 /did/ understand it. > > Understanding CMOV is not a requirement for 686. > > OK, that clears things up a bit. I see now that this is listed in the > "Features" in dmesg on a PentiumIII system. I found the following on the > via site that discusses CMOV and is also related to the CMPXCHG8B code > )see NO_F00F_HACK below). > > http://www.viaarena.com/?PageID=377 > > > I think you get ever-so-slightly better performance if you set your ARCH to > > k6-2, though I use mine as i586/mmx. As for the kernel configuration, I > > left mine at I686_CPU, as the C3 /is/ a 686-class CPU. > > What kernel option do you use for k6-2? I don't see anything in LINT or > GENERIC. Also, what do you mean by "I use mine as i586/mmx"? Is this > another kernel option? Nope, I set that in /etc/make.conf. My kernel options I keep as I686_CPU. The C3 *is* a 686-class CPU. The problem lies in that GCC assumes that if a CPU is i686, it understands CMOV. But CMOV isn't part of the 686 spec. > It also says "should be included for any non-Pentium CPU that defines it" > but how do you know if the C# defines this? Is this another item that > would show up in the "Features" list? I looked at a PI-133 I have and > don't see it : Yeah, I read that over. The wording's a bit weird in that blurb, IMHO. I have *never* used the F00F workaround on any system I've used, and I've never had a problem with it. But I went from 486 straight to PIII. > CPU: Pentium/P54C (133.16-MHz 586-class CPU) > Origin = "GenuineIntel" Id = 0x52c Stepping = 12 > Features=0x3bf > > I have a PII-300 running Fedora, but dmesg doesn't show the features. I > did find it in proc : (Welcome to Linux.) > So it seems like it "should be included for any non-Pentium CPU that > defines it", but it sounds like it may not be an issue if this feature > is implemented correctly... Like I said, I've never used it anywhere. And I've never had problems with it, but I've never gone out of my way to test for it, either. > BTW, do you have problems with your system hanging on a reboot? I reported > this as a bug (misc/60646) which I see has been reported at least twice > before but nothing in the knats database shows it as being solved. Do you > know of a fix for this? Nope. I've had nothing but pure glee when dealing with the C3's, once I figured out the GCC assumption. I've been running 5.x on my C3s pretty much since the beginning -- which would mean the CMOV assumption carries over into 3.x for gcc -- and I've never had any CPU-related issues.