From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 8C201BC57 for ; Wed, 17 Nov 2010 12:12:40 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsAAAE5H40zZSMDqjmdsb2JhbACiQRUBAQEBCQsICQ8FH8BQhUsEjWQ X-IronPort-AV: E=Sophos;i="4.59,210,1288566000"; d="scan'208";a="66601523" Received: from fmmailgate03.web.de ([217.72.192.234]) by mail3-smtp-sop.national.inria.fr with ESMTP; 17 Nov 2010 12:12:40 +0100 Received: from smtp03.web.de ( [172.20.0.65]) by fmmailgate03.web.de (Postfix) with ESMTP id 86C90173A5815; Wed, 17 Nov 2010 12:12:39 +0100 (CET) Received: from [78.43.204.177] (helo=frosties.localdomain) by smtp03.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #24) id 1PIfwN-00075o-00; Wed, 17 Nov 2010 12:12:39 +0100 Received: from mrvn by frosties.localdomain with local (Exim 4.72) (envelope-from ) id 1PIfwN-0008U3-2s; Wed, 17 Nov 2010 12:12:39 +0100 From: Goswin von Brederlow To: Sylvain Le Gall Cc: caml-list@inria.fr Subject: Re: [Caml-list] Re: SMP multithreading References: <20101115182737.42b8dcae@loki.yggdrasil.draxit.de> Date: Wed, 17 Nov 2010 12:12:38 +0100 In-Reply-To: (Sylvain Le Gall's message of "Tue, 16 Nov 2010 12:47:13 +0000 (UTC)") Message-ID: <8762vwdx09.fsf@frosties.localnet> User-Agent: Gnus/5.110009 (No Gnus v0.9) XEmacs/21.4.22 (linux, no MULE) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: goswin-v-b@web.de X-Sender: goswin-v-b@web.de X-Provags-ID: V01U2FsdGVkX1/+KNq4pnmgtxWVzi8OhczEmh/HClCpVzMd5FJ/ PnxF3cG80s+GxGZcLLkAYU4B77tJeGgTmjGTkzwV114uo7fxTc LelihyxqA= X-Spam: no; 0.00; le-gall:01 speedups:01 ocaml:01 runtime:01 speedup:01 speedup:01 maillist:98 acb:98 15.:98 1.5:98 utilize:98 mfg:98 threads:01 threads:01 wrote:01 Sylvain Le Gall writes: > Hi, > > On 15-11-2010, Wolfgang Draxinger wrote: >> Hi, >> >> I've just read >> http://caml.inria.fr/pub/ml-archives/caml-list/2002/11/64c14acb90cb14bedb2cacb73338fb15.en.html >> in particular this paragraph: >>| What about hyperthreading? Well, I believe it's the last convulsive >>| movement of SMP's corpse :-) We'll see how it goes market-wise. At >>| any rate, the speedups announced for hyperthreading in the Pentium 4 >>| are below a factor of 1.5; probably not enough to offset the overhead >>| of making the OCaml runtime system thread-safe. >> >> This reads just like the "640k ought be enough for everyone". Multicore >> systems are the standard today. Even the cheapest consumer machines >> come with at least two cores. Once can easily get 6 core machines today. >> >> Still thinking SMP was a niche and was dying? >> > > Hyperthreading was never remarkable about performance or whatever and is > probably not pure SMP (emulated SMP maybe?). Hyperthreading is a hack to better utilize idle cpu sub units. The CPU has multiple complete sets of registers, one per hyper thread. Execution of the threads is interleaved. Now when one thread is doing some floating point operation the cpu switches over to another thread and lets it do some integer aritmetic. But that assumes the threads are using different sub units. If they are using the same unit then they just block each other and no speedup occurs. The speedup of hyperthreading is purely from avoiding dead cycles when one thread waits for something. On te other hand the cache is shared between threads so per thread it is smaller and more easily trashed. Hyperthreading can be much slower too. MfG Goswin