From owner-freebsd-current@FreeBSD.ORG Fri Apr 13 16:16:47 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 37CB216A400; Fri, 13 Apr 2007 16:16:47 +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 EB06A13C45A; Fri, 13 Apr 2007 16:16:46 +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 04BB02090; Fri, 13 Apr 2007 18:16:41 +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 E2E582087; Fri, 13 Apr 2007 18:16:40 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 1001) id C7D2850CD; Fri, 13 Apr 2007 18:16:40 +0200 (CEST) From: des@des.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=) To: freebsd-current@FreeBSD.ORG References: <200704131452.l3DEqjXv040099@lurza.secnetix.de> Date: Fri, 13 Apr 2007 18:16:40 +0200 In-Reply-To: <200704131452.l3DEqjXv040099@lurza.secnetix.de> (Oliver Fromme's message of "Fri, 13 Apr 2007 16:52:45 +0200 (CEST)") Message-ID: <8664801c7r.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, craig@xfoil.gank.org, rick-freebsd@kiwi-computer.com, bde@zeta.org.au 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: Fri, 13 Apr 2007 16:16:47 -0000 Oliver Fromme writes: > 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. Only when the operand is invalid. This causes an invalid opcode exception which can not be handled because the memory bus is locked, preventing the handler from beig loaded into cache. > (FreeBSD has a hack to work around the problem, as you certainly > know ... I don't know exactly how it works.) By marking the interrupt descriptor table read-only, the invalid opcode exception triggers a page fault, which unlocks the bus. The page fault handler examines the state of the CPU, determine that an invalid opcode exception occurred, and passes control to the appropriate handler (which sends SIGILL to the offending process). Additionally, to avoid penalizing other exceptions, the IDT is aligned such that it crosses a page boundary immediately after the entry for the invalid opcode exception, so only the first six entries in the IDT needs to be read-only. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no