From: John Chu <johnchu@acm.org>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] STM support in OCaml
Date: Thu, 9 Mar 2006 05:38:08 -0500 [thread overview]
Message-ID: <ba7796bc654ee0e89c715ee2f60ce8da@acm.org> (raw)
In-Reply-To: <1141878751.8450.37.camel@budgie.wigram>
> I know, so was I -- I've read the AMD64 specs.
[snip]
> 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.
If you've read the AMD64 specs, then you know about the Owned state in
the cache coherence protocol AMD chips use. It allows one processor to
update another processor without having to update main memory. i.e.,
one processor goes from M->O, the other goes from I->S. The O state is
there to remind the first processor that on an eviction, it can't
simply drop the cache line (as it could a line in the S state). It must
write back to main memory as if it were in the M state.
You're obviously right that two processes on two cores use the same
data, the data will obviously need to be copied from the cache
hierarchy of one core to the other core. What I'm saying is that it
does not need to write into main memory first.
john
next prev parent reply other threads:[~2006-03-09 10:36 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
2006-03-09 10:38 ` John Chu [this message]
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=ba7796bc654ee0e89c715ee2f60ce8da@acm.org \
--to=johnchu@acm.org \
--cc=caml-list@yquem.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