From owner-freebsd-current@FreeBSD.ORG Thu Apr 12 08:54:23 2007 Return-Path: X-Original-To: freebsd-current@FreeBSD.ORG Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 92D5D16A401; Thu, 12 Apr 2007 08:54:23 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 4EA4913C45E; Thu, 12 Apr 2007 08:54:23 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 180182090; Thu, 12 Apr 2007 10:54:19 +0200 (CEST) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on tim.des.no Received: from dwp.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id E39D52087; Thu, 12 Apr 2007 10:54:18 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 1001) id 378C24A29; Thu, 12 Apr 2007 10:54:18 +0200 (CEST) From: des@des.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=) To: Peter Jeremy References: <20070406025700.GB98545@garage.freebsd.pl> <86k5wo55s0.fsf@dwp.des.no> <20070407203411.GJ8831@cicely12.cicely.de> <86wt0n3mxv.fsf@dwp.des.no> <20070411214911.GA38351@VARK.MIT.EDU> <20070412073605.GB834@turion.vk2pj.dyndns.org> Date: Thu, 12 Apr 2007 10:54:17 +0200 In-Reply-To: <20070412073605.GB834@turion.vk2pj.dyndns.org> (Peter Jeremy's message of "Thu, 12 Apr 2007 17:36:06 +1000") Message-ID: <86ps6aht1i.fsf@dwp.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-fs@FreeBSD.ORG, freebsd-current@FreeBSD.ORG, Pawel Jakub Dawidek , ticso@cicely.de Subject: Re: ZFS committed to the FreeBSD base. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Apr 2007 08:54:23 -0000 Peter Jeremy writes: > There's a feature bit (CPUID_CX8) that advertises the availability of > cmpxchg8b (and maybe some related instructions). My pre-MMX 586 has > this bit set so I presume anything later than 486 will support it. > (I'm not sure about the low-end VIA, GEODE etc clones). The Geode is a 486, and does not support it. The C3 however is a 586. The C3 Ezra and C3 Samuel / Samuel 2 do not have CX8. I'm not sure about the C3 Nehemiah, I don't have one running at the moment. > I agree that GENERIC should run on lowest-common-denominator hardware > (the definition of that is a subject for a different thread). GENERIC > performance could be enhanced by using an indirect call for 8-byte > atomic instructions and selecting between the cmpxchg8b and > alternative implementation as part of the CPU startup (much like > i586_bcopy). If CPU_486 is not defined, you code could inline the > cmpxchg8b-based variant. Our native atomic operations are all defined as either macros or static inline functions in machine/atomic.h, so we can easily make this choice at compile time based on a config option. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no