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.5 required=5.0 tests=AWL,MAILTO_TO_SPAM_ADDR autolearn=disabled version=3.1.3 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 A0B8EBC6C for ; Tue, 18 Dec 2007 18:19:13 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAA+QZ0fAXQImh2dsb2JhbACQAQEBAQgKKZly X-IronPort-AV: E=Sophos;i="4.24,180,1196636400"; d="scan'208";a="5791157" Received: from discorde.inria.fr ([192.93.2.38]) by mail1-smtp-roc.national.inria.fr with ESMTP; 18 Dec 2007 18:19:13 +0100 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id lBIHJ8Ut027712 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Tue, 18 Dec 2007 18:19:13 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAEuQZ0dQW+UCh2dsb2JhbACQAQEBAQgKKZls X-IronPort-AV: E=Sophos;i="4.24,180,1196636400"; d="scan'208";a="6982225" Received: from main.gmane.org (HELO ciao.gmane.org) ([80.91.229.2]) by mail3-smtp-sop.national.inria.fr with ESMTP; 18 Dec 2007 18:19:08 +0100 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1J4fw5-0002ux-6S for caml-list@inria.fr; Tue, 18 Dec 2007 17:08:53 +0000 Received: from ivr94-8-88-162-26-239.fbx.proxad.net ([88.162.26.239]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 18 Dec 2007 17:08:53 +0000 Received: from li by ivr94-8-88-162-26-239.fbx.proxad.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 18 Dec 2007 17:08:53 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Zheng Li Subject: Re: Problems spawning threads Date: Tue, 18 Dec 2007 18:05:08 +0100 Message-ID: <878x3s3pdn.fsf@pps.jussieu.fr> References: <4767582A.6020202@gmail.com> <87tzmg2rqh.fsf@pps.jussieu.fr> <4767EDDA.2030302@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ivr94-8-88-162-26-239.fbx.proxad.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) Cancel-Lock: sha1:HJtBnkbjuYiCs2m5S0uiogYW5tU= Sender: news X-Miltered: at discorde with ID 4768010C.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; iirc:01 edgar:98 hooked:98 threads:01 threads:01 stack:01 stack:01 pps:01 pps:01 jussieu:01 jussieu:01 writes:01 native:03 sync:04 size:95 Hi Edgar Friendly writes: > My laptop does a just fine job making and using 503 native threads with > 512M ram (and lots of big programs already filling that up). I don't > believe that their (likely beefier) benchmarking system hits a VM limit > mine doesn't. Just made a test, the upper bound of my machine is 381 threads (without event sync, just start threads and hold). You probably have to wrap some C function to set pthread's stack size to ~ PTHREAD_STACK_MIN. > The code should create 503 threads and 503 channels hooked together in a > ring, and *then* it starts a message (a simple counter) going around the > ring until it's counted high enough (normal test goes to 20,000,000 > iirc), and then the last task to get the message prints its position. > None of the threads finish while thread creation continues. My mistake. -- Zheng Li http://www.pps.jussieu.fr/~li