From owner-freebsd-current@FreeBSD.ORG Fri Apr 13 14:53:04 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 04EE416A415; Fri, 13 Apr 2007 14:53:04 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.freebsd.org (Postfix) with ESMTP id 5AC1113C46C; Fri, 13 Apr 2007 14:52:58 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (fmhmda@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id l3DEqjYi040100; Fri, 13 Apr 2007 16:52:51 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id l3DEqjXv040099; Fri, 13 Apr 2007 16:52:45 +0200 (CEST) (envelope-from olli) Date: Fri, 13 Apr 2007 16:52:45 +0200 (CEST) Message-Id: <200704131452.l3DEqjXv040099@lurza.secnetix.de> From: Oliver Fromme To: freebsd-current@FreeBSD.ORG, bde@zeta.org.au, des@des.no, freebsd-fs@FreeBSD.ORG, craig@xfoil.gank.org, rick-freebsd@kiwi-computer.com In-Reply-To: X-Newsgroups: list.freebsd-current User-Agent: tin/1.8.2-20060425 ("Shillay") (UNIX) (FreeBSD/4.11-STABLE (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Fri, 13 Apr 2007 16:52:52 +0200 (CEST) Cc: Subject: Re: ZFS committed to the FreeBSD base. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-current@FreeBSD.ORG, bde@zeta.org.au, des@des.no, freebsd-fs@FreeBSD.ORG, craig@xfoil.gank.org, rick-freebsd@kiwi-computer.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Apr 2007 14:53:04 -0000 Bruce Evans wrote: > Not for cmpxchg8b, at least. It is a remarkably slow instruction. On > AthlonXP's it has an execution latency of 39 cycles. cmpxchg only has an > cmpxchg only has an execution latency of 6 cycles (both without a lock > prefix). I don't know how to avoid using cmpxchg8b short of using a > mutex lock/unlock pair and slightly different semantics, or a generation > count and very different semantics, but without lock prefixes the > mutex pair would be much faster than the cmpxchg8b. Using cmpxchg8b with a lock prefix wouldn't be a good idea anyway. If I remember correctly, the lock cmpxchg8b combination was the cause of the infamous "F00F" bug of old Pentium processors. It causes them to freeze. (FreeBSD has a hack to work around the problem, as you certainly know ... I don't know exactly how it works.) Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd It's trivial to make fun of Microsoft products, but it takes a real man to make them work, and a God to make them do anything useful.