From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id D2AE7BB81 for ; Thu, 9 Mar 2006 00:05:08 +0100 (CET) Received: from nproxy.gmail.com (nproxy.gmail.com [64.233.182.198]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k28N58wL020628 for ; Thu, 9 Mar 2006 00:05:08 +0100 Received: by nproxy.gmail.com with SMTP id h2so233662nfe for ; Wed, 08 Mar 2006 15:05:07 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:mime-version:in-reply-to:references:content-type:message-id:content-transfer-encoding:from:subject:date:to:x-mailer; b=Z5NJ1bCXdtAehF2ZAKHOKsVHX0xEVPt1py12l9HzrOOZbnXIKCMlPnjHtsYoHcEeoFWdwBH04QKfj+Y5AHyxWLYTPhqezyW2WZqdoRisnDcE1OZsZ0LFzgYBGZU6nvTGl+mghkVi/SgVI+TGL106GCPqvvvAxGGXttFu2CQcP9k= Received: by 10.48.143.20 with SMTP id q20mr651972nfd; Wed, 08 Mar 2006 15:05:07 -0800 (PST) Received: from ?192.168.3.65? ( [82.210.120.52]) by mx.gmail.com with ESMTP id x27sm1122590nfb.2006.03.08.15.05.07; Wed, 08 Mar 2006 15:05:07 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v746.2) In-Reply-To: References: <440DB255.1030701@asfandyar.cjb.net> <1141751708.20944.355.camel@budgie.wigram> <440DD982.8080800@asfandyar.cjb.net> <1141779125.20944.405.camel@budgie.wigram> <20060308193633.GA5460@coruscant.stwing.upenn.edu> <1141855594.23909.63.camel@budgie.wigram> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: =?ISO-8859-1?Q?Lodewijk_V=F6ge?= Subject: Re: [Caml-list] STM support in OCaml Date: Thu, 9 Mar 2006 00:05:04 +0100 To: caml-list@yquem.inria.fr X-Mailer: Apple Mail (2.746.2) X-Miltered: at nez-perce with ID 440F6324.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; ocaml:01 rdtsc:01 rdtsc:01 hover:98 wrote:01 caml-list:01 inline:01 assembler:02 gnu:02 mutex:03 mutex:03 brian:04 linux:06 buy:92 i'm:08 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.3 On 8-mrt-2006, at 23:11, Brian Hurt wrote: > Love to. Wanna buy me the box? :-} Seriously- my code is > attached, if someone wants to run it on other boxes and post the > results, feel free. It's GNU-C/x86 specific, as I'm using GNU C's > inline assembler and the rdtsc instruction to get accurate cycle > counts. I don't know if rdtsc is accurate on 64bit, but this is what running it on a dual opteron 250 running 64bit linux gives: $ ./lock Minimum time for a rdtsc instruction (in clocks): 144099185 Minimum time for a mutex lock+unlock + rdtsc (in clocks): 24 multiple runs hover between this and 37 clocks for the mutex, and more than twice for the rdtsc. Lodewijk