From: Gerd Stolpmann <info@gerd-stolpmann.de>
To: Mark Shinwell <mshinwell@janestreet.com>
Cc: Yotam Barnoy <yotambarnoy@gmail.com>,
Ocaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] Concurrent/parallel programming
Date: Wed, 08 Jan 2014 14:38:07 +0100 [thread overview]
Message-ID: <1389188287.3822.10.camel@thinkpad> (raw)
In-Reply-To: <CAM3Ki76RVOFKCQ1mXDRn4dQX7c2cmXr45k+OiUe9x7cMrjuUhw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2058 bytes --]
Am Mittwoch, den 08.01.2014, 11:55 +0000 schrieb Mark Shinwell:
> On 8 January 2014 11:36, Gerd Stolpmann <info@gerd-stolpmann.de> wrote:
> > There is a workaround in place - so far the OS supports it: thanks to
> > Xavier the symbols caml_modify and caml_initialize are declared as weak
> > in 4.01, allowing them to be redefined in executables. Netmulticore
> > redefines these symbols with their pre-4.01 functions.
> >
> > This isn't optimal yet, because the old write barriers are a bit slower,
> > and because this introduces a very low-level dependency on the current
> > version of Ocaml. Nevertheless, it works for now. (Ideas for a better
> > solution are highly welcome.)
>
> Jeremie Dimino and myself have a somewhat embryonic proposal
> that should permit most of the write barrier to be
> circumvented for out-of-heap access, and also avoid the page
> table test. We'll send mail to the list in due course once
> we've had time to think about this further.
I'm very curious to hear about that.
So far I have only the idea to override the := operator selectively in
all modules that want to modify out-of-heap values:
let ( := ) = Netmcore_heap.assign h
where Netmcore_heap.assign is a C function that tests whether the
destination address is in the out-of-heap address space of h. If so, the
assignment can be done directly. If not, it just falls back to a normal
caml_modify.
This solution isn't nice, though, because it can be very problematic to
have the extra indirection of ref. So, what I'm searching for is a way
to turn any record mutation into an external C function call (or at
least to parametrize the write barrier somehow).
Gerd
> Mark
>
--
------------------------------------------------------------
Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de
Creator of GODI and camlcity.org.
Contact details: http://www.camlcity.org/contact.html
Company homepage: http://www.gerd-stolpmann.de
------------------------------------------------------------
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
next prev parent reply other threads:[~2014-01-08 13:38 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-07 19:54 Yotam Barnoy
2014-01-07 20:12 ` Yaron Minsky
2014-01-07 20:21 ` Yaron Minsky
2014-01-07 20:35 ` Gerd Stolpmann
2014-01-08 2:35 ` Yotam Barnoy
2014-01-08 3:33 ` Francois Berenger
2014-01-08 4:01 ` Yotam Barnoy
2014-01-08 8:37 ` Gabriel Scherer
2014-01-08 11:36 ` Gerd Stolpmann
2014-01-08 11:55 ` Mark Shinwell
2014-01-08 13:38 ` Gerd Stolpmann [this message]
2014-01-07 21:51 ` Markus Mottl
[not found] ` <20140107200328.GA14297@voyager>
2014-01-08 1:12 ` Francois Berenger
2014-01-08 20:29 ` Roberto Di Cosmo
2014-01-08 22:13 ` Yotam Barnoy
2014-01-08 22:38 ` Anil Madhavapeddy
2014-01-08 22:57 ` [Caml-list] [ocaml-infra] " Ashish Agarwal
2014-01-09 2:52 ` Yotam Barnoy
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=1389188287.3822.10.camel@thinkpad \
--to=info@gerd-stolpmann.de \
--cc=caml-list@inria.fr \
--cc=mshinwell@janestreet.com \
--cc=yotambarnoy@gmail.com \
/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).