From owner-freebsd-smp Tue Jun 29 13:24:29 1999 Delivered-To: freebsd-smp@freebsd.org Received: from par28.ma.ikos.com (par28.ma.ikos.com [137.103.105.228]) by hub.freebsd.org (Postfix) with ESMTP id 9B63B15111 for ; Tue, 29 Jun 1999 13:24:12 -0700 (PDT) (envelope-from tich@par28.ma.ikos.com) Received: from [[UNIX: localhost]] ([[UNIX: localhost]]) by par28.ma.ikos.com (8.8.7/8.8.7) id QAA23577; Tue, 29 Jun 1999 16:23:46 -0400 From: Richard Cownie To: Kevin Van Maren , freebsd-smp@FreeBSD.ORG, tich@ma.ikos.com, vanmaren@cs.utah.edu Subject: Re: high-efficiency SMP locks - submission for review Date: Tue, 29 Jun 1999 16:05:57 -0400 X-Mailer: KMail [version 1.1.0] Content-Type: text/plain References: <199906291908.NAA08028@fast.cs.utah.edu> MIME-Version: 1.0 Message-Id: <99062916234600.22336@par28.ma.ikos.com> Content-Transfer-Encoding: 8bit X-KMail-Mark: Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Tue, 29 Jun 1999, Kevin Van Maren wrote: > > No, you can have a non-aligned locked access - there's a bunch of > > complex and ugly stuff ("split locks", the SPLCK# bus signal) in > > the P6 bus protocol to support this. But don't do it if you can > > possibly avoid it - it's inefficient, and since it exercises arcane > > features of the hardware, it could be buggy. > > My understanding is that it is only guaranteed to be atomic for the > processor family if it is naturally-aligned, although current > processors ALSO provide atomic operatings for unaligned accesses. > My point is that we should not rely on unaligned accesses being > atomic, as per intel documentation. I've never really been convinced that there's a rigorous definition of the x86 family architecture, as distinct from what the particular implementations happen to do. Or where there *is* a specification, Intel feels quite free to violate it (e.g. the MPS spec says that you can mix different CPU's - but the truth for the P6/PentiumII/PentiumIII is that all the CPU's in an SMP system need to be the exact same stepping). On the other hand, there's so much weird software out there that Intel will probably never allow themselves to remove any feature that might possibly be used in some application somewhere. So I'd bet that future cpu's will continue to support atomic misaligned read-modify-write. However, it doesn't seem that there's any good reason to use this particular feature. It's easy to get stuff aligned, and much more efficient. Richard Cownie To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message