caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Robert Roessler <roessler@rftp.com>
To: Caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] Severe loss of performance due to new signal handling
Date: Tue, 21 Mar 2006 04:54:37 -0800	[thread overview]
Message-ID: <441FF78D.8020309@rftp.com> (raw)
In-Reply-To: <f8560b80603201911s60ed2882md3e2e2f8f3ca004f@mail.gmail.com>

Markus Mottl wrote:
> On 3/20/06, *Robert Roessler* <roessler@rftp.com 
> 
>     At the risk of being "irrelevant", I wanted to nail down exactly what
>     assertion is being made here: are we talking about directly executing
>     in assembly code the relevant x86[-64]/ppc/whatever instructions for
>     "read-and-clear", or going through OS-dependent access routines like
>     Windows' InterlockedExchange()?
> 
> 
> We are talking of the assembly code.  See file 
> byterun/signals_machdep.h, which contains the corresponding macros.

Thanks, Markus - in the case you cite (direct instruction use), I was 
hoping for some illumination on this huge cost... reviewing the Intel 
manuals, I note that:

1) there is *no* claim that cache lines are flushed just by doing the xchg

2) in fact, with the Pentium Pro on, the bus LOCK# operation will not 
even happen if the data is cached - everything is left to the cache 
coherency mechanism

3) there *is* mention of processor *cache locking*, but this is still 
just in the context of cache coherency with multiple processors... so 
nothing here is suggesting cache line flushing or anything else that 
sounds horrendously expensive, particularly in the single CPU case

< 8 hours later, back to finish email :) >

Finally, it is interesting that you bring up this file - it appears as 
if the msvc toolchain is no longer supported for doing "correct" (in 
terms of Xavier's "atomicity w.r.t. signals") builds... at least that 
is how I interpret the conditional compilation directives.

Robert Roessler
roessler@rftp.com
http://www.rftp.com


      parent reply	other threads:[~2006-03-21 12:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-17 18:39 Markus Mottl
2006-03-17 19:10 ` [Caml-list] " Christophe TROESTLER
2006-03-20  9:29 ` Xavier Leroy
2006-03-20 10:39   ` Oliver Bandel
2006-03-20 12:37     ` Gerd Stolpmann
2006-03-20 13:13       ` Oliver Bandel
2006-03-20 15:54       ` Xavier Leroy
2006-03-20 16:15   ` Markus Mottl
2006-03-20 16:24     ` Will Farr
2006-03-21  1:33   ` Robert Roessler
2006-03-21  3:11     ` Markus Mottl
2006-03-21  4:04       ` Brian Hurt
2006-03-21 12:54       ` Robert Roessler [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=441FF78D.8020309@rftp.com \
    --to=roessler@rftp.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).