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 concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id C6ABDBBBC for ; Wed, 22 Mar 2006 11:56:58 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id k2MAuwkp008511 for ; Wed, 22 Mar 2006 11:56:58 +0100 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA14981 for ; Wed, 22 Mar 2006 11:56:57 +0100 (MET) Received: from smtp114.sbc.mail.mud.yahoo.com (smtp114.sbc.mail.mud.yahoo.com [68.142.198.213]) by nez-perce.inria.fr (8.13.0/8.13.0) with SMTP id k2MAuulk025735 for ; Wed, 22 Mar 2006 11:56:57 +0100 Received: (qmail 13834 invoked from network); 22 Mar 2006 10:56:56 -0000 Received: from unknown (HELO ?192.168.1.100?) (rftp@pacbell.net@69.230.226.66 with plain) by smtp114.sbc.mail.mud.yahoo.com with SMTP; 22 Mar 2006 10:56:55 -0000 Message-ID: <44212D7A.5040102@rftp.com> Date: Wed, 22 Mar 2006 02:56:58 -0800 From: Robert Roessler User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060318 SeaMonkey/1.5a MIME-Version: 1.0 To: Caml-list Subject: Re: [Caml-list] Severe loss of performance due to new signal handling (fwd) References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 44212D7A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 44212D78.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; parallelism:01 syntax:01 rdtsc:01 rdtsc:01 2006:98 tualatin:98 1.4:98 wrote:01 wrote:01 caml-list:01 caml-list:01 inline:01 hmm:02 contention:04 brian:04 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=none autolearn=disabled version=3.0.3 Brian Hurt wrote: > > ---------- Forwarded message ---------- > Date: Tue, 21 Mar 2006 16:32:51 -0600 (CST) > From: Brian Hurt > To: Robert Roessler > Subject: Re: [Caml-list] Severe loss of performance due to new signal > handling > > On Tue, 21 Mar 2006, Robert Roessler wrote: > >> Well, I *thought* there was a marked absence of "bit-level >> parallelism" in the signal-handling... ;) >> >> So the "expense" of individual atomic operations is not really what is >> at the heart of this performance problem... > > Hmm. Maybe not. I'm measuring a 4 clock cycle cost for a xchgl, both > with and without a lock on my Athlon XP 1.8GHz. See attached code. > Naturally, this is a uniprocessor machine and the memory location is in > L1 cache (or will be soon), and no contention, so this is definately > best case. 4 clocks is about rights for a read and a write to L1 cache > (each L1 cache access taking 2 clocks). And after adjusting the inline assembly syntax for vc7.1, I get Minimum time for a rdtsc instruction (in clocks): 38 Minimum time for a read_and_clear() + rdtsc (in clocks): 75 This is on a P-III S (Tualatin) @ 1.4GHz on Windows XP SP2. Robert Roessler roessler@rftp.com http://www.rftp.com