From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id E228DBBAF for ; Fri, 25 Sep 2009 17:05:08 +0200 (CEST) X-IronPort-AV: E=Sophos;i="4.44,452,1249250400"; d="scan'208";a="36836839" Received: from estephe.inria.fr ([128.93.11.95]) by mail1-relais-roc.national.inria.fr with ESMTP; 25 Sep 2009 17:05:08 +0200 Message-ID: <4ABCDC24.2040806@inria.fr> Date: Fri, 25 Sep 2009 17:05:08 +0200 From: Xavier Leroy User-Agent: Thunderbird 2.0.0.17 (X11/20080929) MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] OC4MC : OCaml for Multicore architectures References: <200909241252.24209.jon@ffconsultancy.com> <20090924123940.GA16175@usha.takhisis.invalid> <200909241409.56894.jon@ffconsultancy.com> In-Reply-To: <200909241409.56894.jon@ffconsultancy.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; ocaml:01 zacchiroli:01 0100,:01 run-time:01 ocaml:01 coq:01 intensively:01 generations:01 compiler:01 runtime:01 two-level:01 scheduler:01 low-level:01 model:01 2009:98 Jon Harrop wrote: > On Thursday 24 September 2009 13:39:40 Stefano Zacchiroli wrote: >> On Thu, Sep 24, 2009 at 12:52:24PM +0100, Jon Harrop wrote: >>> The next steps are to get oc4mc into the apt repositories and build >> Uhm, I'm curious: how do you plan to achieve that? > > Good question. I have no idea, of course. :-) That would be suicidal. I definitely do not want to belittle the work of Philippe and his teammates -- what they did is an amazing hack indeed --, but you need to keep in mind the difference between a proof-of-concept experiment and a product. In a proof-of-concept experiment, you implement the feature want to experiment with and keep everything else as simple as possible (otherwise there is little chance that you'll complete the experiment). That's exactly what Philippe et al did, and rightly so: their GC is about the simplest you can think of, they didn't bother adapting some features of the run-time system, they target AMD64/Unix only, etc. Now they have a platform they can experiment with and make measurements on: mission accomplished. In a product, you'd need something that is essentially a drop-off replacement for today's OCaml and can run, say, Coq with at most a 10% slowdown. That's a long way to go (I'd say a couple of years of work). For example, single-generation stop-and-copy GC is known to have terrible performance (both in running time and in latency) for programs that have large data sets and allocate intensively. This is true in the sequential case and even worse in a stop-the-world parallel setting, by Amdahl's law. Note that the programs I mentioned above are exactly those that the Caml user community cares most about -- not matrix multiply nor ray tracers, Harrop's propaganda notwithstanding -- and those for which OCaml has been delivering top-class performance for the last 12 years -- again, Harrop's propaganda notwithstanding. On your way to a product, you'd need to independently-collectable generations (which means some work on the compiler as well), plus a parallel or even better concurrent major collector. And of course a lot more work on the runtime system and C interface to make everything truly reentrant while remaining portable. And probably some kind of two-level scheduler for threads. And after all that work you'd end up with an extremely low-level and unsafe parallel programming model that you'd need to tame by developing clever libraries that mere mortals can use effectively (Apple's Grand Central was mentioned on this thread; it's a good example)... In summary, Philippe and his coauthors do deserve a round of applause, but please keep a cool head. - Xavier Leroy