From owner-freebsd-current Wed Jan 17 10:30:15 2001 Delivered-To: freebsd-current@freebsd.org Received: from meow.osd.bsdi.com (meow.osd.bsdi.com [204.216.28.88]) by hub.freebsd.org (Postfix) with ESMTP id 3BEBD37B6C2 for ; Wed, 17 Jan 2001 10:29:47 -0800 (PST) Received: from laptop.baldwin.cx (john@jhb-laptop.osd.bsdi.com [204.216.28.241]) by meow.osd.bsdi.com (8.11.1/8.9.3) with ESMTP id f0HIQAL37735; Wed, 17 Jan 2001 10:26:10 -0800 (PST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <53512.979753444@critter> Date: Wed, 17 Jan 2001 10:28:03 -0800 (PST) From: John Baldwin To: Poul-Henning Kamp Subject: Re: Atomic breakage? Cc: Peter Jeremy , current@FreeBSD.org, Garrett Wollman , Robert Drehmel Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 17-Jan-01 Poul-Henning Kamp wrote: > In message <3A65D810.6304785A@gizmo.quizbot.org>, Robert Drehmel writes: >>In , John Baldwin wrote: >>> Early Pentiums (<= P90) don't support CX8 or so I've heard, which make this >>> slightly more complicated, as for a pentium we would have to use a function >>> pointer that we setup during probe. Also, during a SMP boot we would have >>> to >>> panic if CX8 wasn't enabled on all CPU's. >> >>P75 (stepping 5): >> >>cmpxchg8 was actually introduced with the Pentium processors, >>as Mr. Wollman already wrote. > > Either way, it's precense should be determined by looking at the CPUID > feature bit. It's the only reliable way. It's expensive though. Ok, after some digging I found out what this particular person was referring to: on Pentiums with stepping < 0xc, a cmpxchg8b that crosses a page boundary triggers an illegel opcode fault rather than a page fault if the second page is missing. Woo. :) So as long as we keep all atomically-accessed 64-bit integers within a single page we should be fine for CX8 on all pentiums should we even want 64-bit atomic ops. -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message