caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: skaller <skaller@users.sourceforge.net>
To: Brian Hurt <bhurt@spnz.org>
Cc: caml-list@yquem.inria.fr, William Lovas <wlovas@stwing.upenn.edu>
Subject: Re: [Caml-list] STM support in OCaml
Date: Thu, 09 Mar 2006 15:32:31 +1100	[thread overview]
Message-ID: <1141878751.8450.37.camel@budgie.wigram> (raw)
In-Reply-To: <Pine.LNX.4.63.0603082116010.9569@localhost.localdomain>

On Wed, 2006-03-08 at 21:19 -0600, Brian Hurt wrote:

> > I couldn't believe it! That's why we tried the experiment:
> > did the OS really invalidate the 'whole' caches, or did our
> > trivial increment program fail, because the memory being
> > incremented wasn't coherent?

>  I'm simplifying 
> enormously here, 

I know, so was I -- I've read the AMD64 specs.

Suppose I have a thread that creates an array
which fits roughly in the cache. Then I hand it
over to another thread to fold. The first thread
has to load stuff from RAM to populate the array, 
which slows it down.

Then it has to write the whole array back to RAM,
and the second thread reloads the whole array from
RAM into the cache.

In that case the whole cache has to be not only 
flushed to RAM, it has to be reloaded into another
cache. Pretty nasty .. on a MP machine.  

On a uniprocessor, the same CPU will do the fold,
and the cache doesn't have to be either saved
or reloaded. Yes, that's an extreme case!

-- 
John Skaller <skaller at users dot sourceforge dot net>
Async PL, Realtime software consultants
Checkout Felix: http://felix.sourceforge.net


  reply	other threads:[~2006-03-09  4:32 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-07 16:18 Asfand Yar Qazi
2006-03-07 16:50 ` [Caml-list] " Sebastian Egner
2006-03-07 17:44   ` Michael Hicks
2006-03-08  0:37     ` Asfand Yar Qazi
2006-03-08  5:05       ` Erick Tryzelaar
2006-03-11 19:43     ` Deadlock free locking scheme (was: Re: [Caml-list] STM support in OCaml) David MENTRE
2006-03-07 17:15 ` [Caml-list] STM support in OCaml skaller
2006-03-07 19:05   ` Asfand Yar Qazi
2006-03-08  0:52     ` skaller
2006-03-08  7:08       ` Bardur Arantsson
2006-03-08 10:38       ` [Caml-list] " Asfand Yar Qazi
2006-03-08 19:36       ` William Lovas
2006-03-08 20:45         ` Brian Hurt
2006-03-08 21:14           ` Paul Snively
2006-03-08 22:06           ` skaller
2006-03-08 22:10             ` Gerd Stolpmann
2006-03-08 23:48               ` skaller
2006-03-09  7:45               ` Andrae Muys
2006-03-09  9:18                 ` David Brown
2006-03-08 22:11             ` Brian Hurt
2006-03-08 23:05               ` Lodewijk Vöge
2006-03-09  3:13                 ` Brian Hurt
2006-03-08 23:45               ` Robert Roessler
2006-03-09  0:23               ` skaller
2006-03-09  3:19                 ` Brian Hurt
2006-03-09  4:32                   ` skaller [this message]
2006-03-09 10:38                     ` John Chu
2006-03-09 16:53                     ` Stefan Monnier
2006-03-11 15:26             ` [Caml-list] " Florian Weimer
2006-03-08 10:11 yoann padioleau
2006-03-08 10:41 ` Asfand Yar Qazi
2006-03-08 12:23   ` skaller
2006-03-08 23:02     ` Asfand Yar Qazi
2006-03-09  0:36       ` skaller
2006-03-08 11:32 ` Gerd Stolpmann
2006-03-08 12:04   ` skaller
2006-03-08 19:22     ` Dan Grossman
2006-03-08 22:10       ` skaller

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=1141878751.8450.37.camel@budgie.wigram \
    --to=skaller@users.sourceforge.net \
    --cc=bhurt@spnz.org \
    --cc=caml-list@yquem.inria.fr \
    --cc=wlovas@stwing.upenn.edu \
    /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).