Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Mar 2000 22:10:42 -0800
From:      Alfred Perlstein <bright@wintelcom.net>
To:        Jonathan Lemon <jlemon@flugsvamp.com>
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>
In-Reply-To: <200003300530.XAA40214@prism.flugsvamp.com>; from jlemon@flugsvamp.com on Wed, Mar 29, 2000 at 11:30:00PM -0600
References:  <local.mail.freebsd-current/20000329192526.U21029@fw.wintelcom.net> <local.mail.freebsd-current/NBBBJNDFEKPEHPFCLNLHMEIJGHAA.pulsifer@mediaone.net> <local.mail.freebsd-current/20000329214422.X21029@fw.wintelcom.net> <200003300530.XAA40214@prism.flugsvamp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
* Jonathan Lemon <jlemon@flugsvamp.com> [000329 21:52] wrote:
> In article <local.mail.freebsd-current/20000329214422.X21029@fw.wintelcom.net> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000329221042.Y21029>