From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 7F1297F75C for ; Thu, 11 Sep 2014 00:42:39 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of yotambarnoy@gmail.com) identity=pra; client-ip=209.85.192.43; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="yotambarnoy@gmail.com"; x-sender="yotambarnoy@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of yotambarnoy@gmail.com designates 209.85.192.43 as permitted sender) identity=mailfrom; client-ip=209.85.192.43; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="yotambarnoy@gmail.com"; x-sender="yotambarnoy@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-qg0-f43.google.com) identity=helo; client-ip=209.85.192.43; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="yotambarnoy@gmail.com"; x-sender="postmaster@mail-qg0-f43.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aj4BANfSEFTRVcArm2dsb2JhbABgDoQtgnjPFAGBCggWEAEBAQEBBgsLCRQqhAMBAQEDARIRHQEbHQEDAQsGBQQHDSoCAiEBAREBBQEcBhMiiAsBAwkInXxrizCBcoMQiQEKGScNZoV8AREBBQ6NEoItB4J5gVMFmmyCEI58hEsYKYRQXiEvAYJOAQEB X-IPAS-Result: Aj4BANfSEFTRVcArm2dsb2JhbABgDoQtgnjPFAGBCggWEAEBAQEBBgsLCRQqhAMBAQEDARIRHQEbHQEDAQsGBQQHDSoCAiEBAREBBQEcBhMiiAsBAwkInXxrizCBcoMQiQEKGScNZoV8AREBBQ6NEoItB4J5gVMFmmyCEI58hEsYKYRQXiEvAYJOAQEB X-IronPort-AV: E=Sophos;i="5.04,501,1406584800"; d="scan'208";a="94035935" Received: from mail-qg0-f43.google.com ([209.85.192.43]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 11 Sep 2014 00:42:38 +0200 Received: by mail-qg0-f43.google.com with SMTP id a108so8264851qge.16 for ; Wed, 10 Sep 2014 15:42:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=2Posj+rknlKDlzAro7WudoKuwSxJWqNSB4hthCWKb6g=; b=oqtWcvTOxhlp1+VWzI1qgwLlTPRKj+Gf+nUwYl2KlpfECGCLIVQW1mLgGbCoZubQBV OGsW2RzUBLIWwMlF2XIxQC4W19htabA9SQv2k0ujzT3/a/tsgXgoP580/3Q0u+IdgDPo JGuq4euvr15UKds8ZiRwBkyYU93pnrbHBRVyYYquH9UFz4O/OsLPNTAg9Gite8J1H/9D iKuepj5CDxmpDFzbCpcB9ISpMcPjGZjQSPjFj5n90jrO80wO8D+bYcasidbCcowI7f6g h1VJuqTQFfqeZxV8FOSDP22dqo8gatGNoh0lmEz9+4uPTbTbycj9qlTc7t5PibO0pjTG WQdg== X-Received: by 10.224.129.201 with SMTP id p9mr65610459qas.75.1410388957721; Wed, 10 Sep 2014 15:42:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.174.68 with HTTP; Wed, 10 Sep 2014 15:42:17 -0700 (PDT) In-Reply-To: References: From: Yotam Barnoy Date: Wed, 10 Sep 2014 18:42:17 -0400 Message-ID: To: Stephen Dolan Cc: Ocaml Mailing List Content-Type: multipart/alternative; boundary=001a11c2cc0ad1f95f0502bdc4b0 Subject: Re: [Caml-list] Multicore runtime --001a11c2cc0ad1f95f0502bdc4b0 Content-Type: text/plain; charset=UTF-8 Maybe I misunderstood something. Does each domain only have a minor private heap (ie. copying gc) or do they each also have a major private heap/older generation (mark and sweep)? If they have an older generation, then a thread could potentially have a lot of data there, no? On Wed, Sep 10, 2014 at 6:01 PM, Stephen Dolan wrote: > On Tue, Sep 9, 2014 at 4:26 PM, Yotam Barnoy > wrote: > > With great care is right :) But seriously, work stealing is a huge > > undertaking in this model, and may not be feasible at all as far as I can > > tell. Every private heap object accessed by a thread has to be copied > either > > to the shared heap or to the stealer's heap. This is the downside of not > > having one shared heap for everything. Of course there are huge upsides > as > > well, but I don't see how work stealing could work efficiently. The only > > exception would be for a thread that hasn't started running at all, or > has > > allocated very little. > > It's implemented, and was demoed last week in the talk you mention. > Work-stealing is the only reason the silly example program ran faster > on more cores. Still lots of work to be done, but closer to fait than > infeasible. > > Moving objects from a private to the shared heap is not a big deal. > This happens anyway during minor garbage collection. Stealing a fiber > that refers to objects in a private heap essentially involves doing > some of the minor GC work before the next minor GC would otherwise > occur. > > Stephen > --001a11c2cc0ad1f95f0502bdc4b0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Maybe I misunderstood something. Does each domain only hav= e a minor private heap (ie. copying gc) or do they each also have a major p= rivate heap/older generation (mark and sweep)? If they have an older genera= tion, then a thread could potentially have a lot of data there, no?

On Wed, Sep 10, 201= 4 at 6:01 PM, Stephen Dolan <stephen.dolan@cl.cam.ac.uk> wrote:
On Tue, Sep= 9, 2014 at 4:26 PM, Yotam Barnoy <yotambarnoy@gmail.com> wrote:
> With great care is right :) But seriously, work stealing is a huge
> undertaking in this model, and may not be feasible at all as far as I = can
> tell. Every private heap object accessed by a thread has to be copied = either
> to the shared heap or to the stealer's heap. This is the downside = of not
> having one shared heap for everything. Of course there are huge upside= s as
> well, but I don't see how work stealing could work efficiently. Th= e only
> exception would be for a thread that hasn't started running at all= , or has
> allocated very little.

It's implemented, and was demoed last week in the talk you menti= on.
Work-stealing is the only reason the silly example program ran faster
on more cores. Still lots of work to be done, but closer to fait than
infeasible.

Moving objects from a private to the shared heap is not a big deal.
This happens anyway during minor garbage collection. Stealing a fiber
that refers to objects in a private heap essentially involves doing
some of the minor GC work before the next minor GC would otherwise
occur.

Stephen

--001a11c2cc0ad1f95f0502bdc4b0--