From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 21 14:17:42 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4CA18F18; Fri, 21 Feb 2014 14:17:42 +0000 (UTC) Received: from alogt.com (alogt.com [69.36.191.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1ECF21302; Fri, 21 Feb 2014 14:17:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=alogt.com; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=ulnNUl5MmC7Q4KA+tBRP8fL2p9dAF2pwkityjgBzM94=; b=xtbX5gzbC+2wGSbFTATlKp8Vl5IXPjMJlVnya6aTkzn+h0ryeIvPhzulxn8WQ99Nzbvqm4iz2Xp/WZ2zkASy4utbzk6LI8/y0eeq6ouj/xxu7nqlbz7/ZPZ9+iCWRalz9gvg2xQJO8vsJc1f8wZ8isR5ha6Nj6GLrROzhcZlSdc=; Received: from [182.7.203.218] (port=48801 helo=X220.alogt.com) by sl-508-2.slc.westdc.net with esmtpsa (SSLv3:DHE-RSA-AES128-SHA:128) (Exim 4.82) (envelope-from ) id 1WGqv6-0044W0-GH; Fri, 21 Feb 2014 07:17:41 -0700 Date: Fri, 21 Feb 2014 22:17:28 +0800 From: Erich Dollansky To: Andre Albsmeier Subject: Re: pthread programming eats up resources (My or FreeBSD's fault?) Message-ID: <20140221221728.5464e035@X220.alogt.com> In-Reply-To: <20140221122122.GA2031@schlappy> References: <20140218180646.GA67861@schlappy> <53059574.8090605@freebsd.org> <20140220140644.7b1e0074@X220.alogt.com> <5305B786.8020708@freebsd.org> <20140221124405.0791d375@X220.alogt.com> <5306DCC8.3080001@freebsd.org> <20140221131517.66d5b82c@X220.alogt.com> <5306E70D.70402@freebsd.org> <20140221122122.GA2031@schlappy> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.22; amd64-portbld-freebsd10.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - sl-508-2.slc.westdc.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - alogt.com X-Get-Message-Sender-Via: sl-508-2.slc.westdc.net: authenticated_id: erichsfreebsdlist@alogt.com X-Source: X-Source-Args: X-Source-Dir: Cc: freebsd-hackers@freebsd.org, David Xu , Andre Albsmeier X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Feb 2014 14:17:42 -0000 Hi, On Fri, 21 Feb 2014 13:21:22 +0100 Andre Albsmeier wrote: > On Fri, 21-Feb-2014 at 13:41:33 +0800, David Xu wrote: > > On 2014/02/21 13:15, Erich Dollansky wrote: > I would like to recall that my usleep programme was just a first > shot to demonstrate the problem here on my idle machine. For real > work loads the other one (pth2) might be better as this one waits > for all threads to terminate before firing up new ones... do not worry. It was the perfect thing to demonstrate the problem. We all should be happy for this masterpiece of code. Erich