From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 10 00:57:25 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AAADE16A4B3; Fri, 10 Oct 2003 00:57:25 -0700 (PDT) Received: from kientzle.com (h-66-166-149-50.SNVACAID.covad.net [66.166.149.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4CAD743FAF; Fri, 10 Oct 2003 00:57:24 -0700 (PDT) (envelope-from kientzle@acm.org) Received: from acm.org ([66.166.149.54]) by kientzle.com (8.12.9/8.12.9) with ESMTP id h9A7vGkX044990; Fri, 10 Oct 2003 00:57:16 -0700 (PDT) (envelope-from kientzle@acm.org) Message-ID: <3F86665A.8050209@acm.org> Date: Fri, 10 Oct 2003 00:57:14 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20031006 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Terry Lambert References: <20031008083059.GA520@garage.freebsd.pl> <20031008114506.I63940@beagle.fokus.fraunhofer.de> <3F8527E1.26ED0CF6@mindspring.com> In-Reply-To: <3F8527E1.26ED0CF6@mindspring.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: rwatson@freebsd.org cc: hsu@freebsd.org cc: freebsd-hackers@freebsd.org Subject: Re: Dynamic reads without locking. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: kientzle@acm.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Oct 2003 07:57:25 -0000 Terry Lambert wrote: > For certain uses, however, it's safe to not lock before the > read *on Intel architectures*. This can go out the window on > SPARC or PPC, or any architecture where there is no guarantee > that there won't be speculative execution or out-of-order > execution without explicit synchronization. Even on Intel architectures, the compiler can and will reorder operations. Hardware-level issues are only a part of the story. I followed the Java Memory Model mailing lists for a while. A lot of very bright, very experienced people thought they had found ways to avoid locking and were wrong. This stuff is hard. Do NOT underestimate it. Tim