From owner-freebsd-current Wed Mar 29 21:46: 9 2000 Delivered-To: freebsd-current@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 90CC837B6F6; Wed, 29 Mar 2000 21:46:06 -0800 (PST) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id e2U6Agh20172; Wed, 29 Mar 2000 22:10:42 -0800 (PST) Date: Wed, 29 Mar 2000 22:10:42 -0800 From: Alfred Perlstein To: Jonathan Lemon Cc: current@FreeBSD.ORG, dillon@FreeBSD.ORG, alc@FreeBSD.ORG Subject: Re: Using packed structs to gain cheap SMP primatives Message-ID: <20000329221042.Y21029@fw.wintelcom.net> References: <200003300530.XAA40214@prism.flugsvamp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <200003300530.XAA40214@prism.flugsvamp.com>; from jlemon@flugsvamp.com on Wed, Mar 29, 2000 at 11:30:00PM -0600 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Jonathan Lemon [000329 21:52] wrote: > In article you write: > > > >I'm aware of this, the problem is that tz may move in either > >direction. Hence my question about using sizes that are machine > >atomic for read/write. :) > > > >I've got several books on various systems here and I don't remeber > >any of them mentioning a problem with 32bit aligned updates being > >atomic. > > Each architecture will define what is atomic or not. Most modern > architectures will provide atomic access to their native word size, > provided it is aligned on a natural word boundary. > > On the PPro and upwards, 64 bit reads/writes to quadword aligned > structures are atomic. it's just too bad that there is no direct > 64-bit read insn (excluding FP). What I'm calling for is a vote if we'll rely on this type of behavior (32 bit stores being atomic with respect to readers) or not, or perhaps to rely on it but mark it somehow so people can "fix it" if the need arises later by using other locking primatives on what should be atomic updates. My vote is yes. -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message