From owner-freebsd-stable@FreeBSD.ORG Tue Nov 1 14:26:40 2005 Return-Path: X-Original-To: stable@freebsd.org Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4517716A41F for ; Tue, 1 Nov 2005 14:26:40 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 26FC743D64 for ; Tue, 1 Nov 2005 14:26:32 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (junior.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id jA1EQUDr087803; Tue, 1 Nov 2005 07:26:31 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <43677B16.4040706@samsco.org> Date: Tue, 01 Nov 2005 07:26:30 -0700 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8) Gecko/20050615 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Marc Olzheim References: <436116D3.908@samsco.org> <20051031151809.GA83253@stack.nl> <20051101004042.GA28233@samodelkin.net> <20051101112900.GA4903@stack.nl> <20051101123321.GA39888@samodelkin.net> <20051101130245.GE5237@stack.nl> In-Reply-To: <20051101130245.GE5237@stack.nl> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on pooker.samsco.org Cc: stable@freebsd.org, Max Khon Subject: Re: HEADS UP! 6.0-RELEASE coming X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 14:26:40 -0000 Marc Olzheim wrote: > On Tue, Nov 01, 2005 at 06:33:21PM +0600, Max Khon wrote: > >>Hi! >> >>On Tue, Nov 01, 2005 at 12:29:00PM +0100, Marc Olzheim wrote: >> >> >>>>Linking against -lthr (or even -lc_r!) instead of -lpthread solves gdb >>>>"The program no longer exists." problem for me on RELENG_6. >>> >>>Well, yes, but that's not the same. While running on M:N KSE, all sorts >>>of locking needs to be correct, which with non M:N threading you can get >>>away with some (intentional or not) sloppiness. So debugging a fully >>>threaded program with a non M:N threadlib is not always useful. >> >>I do not think that maintaining M:N thread lib is feasible, given the lack >>of resources. Solaris has already moved from M:N to 1:1. Linux (NPTL) is 1:1 >>as well. > > > Well, each threading system has it's own application. Having an easy way > to have one multithreaded process use multiple CPUs is a big win in any > case. Especially in computationally intensive tasks... > > Marc There is little difference between 1:1 and M:N from the application's point of view. Both will allow multiple application threads to run concurrently on multiple CPUs, and both will allow other process threads to run when the current thread blocks in the kernel. The difference is in the details with how they are scheduled and what kernel resources they use. 1:1 has the advantage of being much less complex to implement and maintain, while M:N has the theoretical advantage of cheaper thread context switches. That theory hasn't panned out, though, due to synchronization requirements and the technical requirements of proper TLS support. Scott