From owner-freebsd-current Wed Jan 17 12:26:18 2001 Delivered-To: freebsd-current@freebsd.org Received: from netau1.alcanet.com.au (ntp.alcanet.com.au [203.62.196.27]) by hub.freebsd.org (Postfix) with ESMTP id 2678137B698; Wed, 17 Jan 2001 12:25:57 -0800 (PST) Received: from mfg1.cim.alcatel.com.au (mfg1.cim.alcatel.com.au [139.188.23.1]) by netau1.alcanet.com.au (8.9.3 (PHNE_22672)/8.9.3) with ESMTP id HAA27841; Thu, 18 Jan 2001 07:23:07 +1100 (EDT) Received: from gsmx07.alcatel.com.au by cim.alcatel.com.au (PMDF V5.2-32 #37641) with ESMTP id <01JZ1LYNYTNKEMY2IF@cim.alcatel.com.au>; Thu, 18 Jan 2001 07:23:05 +1100 Received: (from jeremyp@localhost) by gsmx07.alcatel.com.au (8.11.0/8.11.0) id f0HKN2212246; Thu, 18 Jan 2001 07:23:02 +1100 (EST envelope-from jeremyp) Content-return: prohibited Date: Thu, 18 Jan 2001 07:23:02 +1100 From: Peter Jeremy Subject: Re: Atomic breakage? In-reply-to: ; from jhb@FreeBSD.ORG on Wed, Jan 17, 2001 at 10:28:03AM -0800 To: John Baldwin Cc: Poul-Henning Kamp , current@FreeBSD.ORG, Garrett Wollman , Robert Drehmel Mail-followup-to: John Baldwin , Poul-Henning Kamp , current@FreeBSD.ORG, Garrett Wollman , Robert Drehmel Message-id: <20010118072302.E98607@gsmx07.alcatel.com.au> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-disposition: inline User-Agent: Mutt/1.2.5i References: <53512.979753444@critter> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 2001-Jan-17 10:28:03 -0800, John Baldwin wrote: > 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. This comes free of charge (along with better performance) if all 64-bit objects are aligned on 8-byte boundaries. By default our gcc only enforces long (4-byte) alignment (apparently, this is part of the IA32 ABI). We can get 8-byte alignment by adding "__attribute__((aligned(8)))" to the object definition. This is one area where I think we would be better off changing our gcc to default to aligning "long long" (and maybe "double") at 8-byte boundaries. We should at least have an alignment expansion in Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message