From owner-freebsd-arch@FreeBSD.ORG Thu Apr 3 14:21:30 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ED2C937B401 for ; Thu, 3 Apr 2003 14:21:29 -0800 (PST) Received: from puffin.mail.pas.earthlink.net (puffin.mail.pas.earthlink.net [207.217.120.139]) by mx1.FreeBSD.org (Postfix) with ESMTP id 620E043F93 for ; Thu, 3 Apr 2003 14:21:29 -0800 (PST) (envelope-from tlambert2@mindspring.com) Received: from pool0138.cvx21-bradley.dialup.earthlink.net ([209.179.192.138] helo=mindspring.com) by puffin.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 191D58-0002NE-00; Thu, 03 Apr 2003 14:21:16 -0800 Message-ID: <3E8CB38D.A2C4C2DF@mindspring.com> Date: Thu, 03 Apr 2003 14:19:57 -0800 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Peter Wemm References: <20030403204437.22D902A8A5@canning.wemm.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4f082fe5af17d3672917c59bb067d19dc350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c cc: freebsd-arch@freebsd.org Subject: Re: libthr and 1:1 threading. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Apr 2003 22:21:30 -0000 Peter Wemm wrote: > Terry Lambert wrote: > > I have to ask: > > > > Why is it so important to people that the libthr performance > > gains be impossible to achieve without use of the 1:1 model, > > rather than a modification of libc_r, or avoidance of existing > > kernel latencies? > > Cost vs. Benefit is a big factor. As Jeff has shown, writing a functional > 1:1 libthr is significantly easier than M:N or the other alternatives. > Easier to write, easier to maintain, easier to understand, easier to debug, > and *good enough*. Its all very well for somebody to sit on the sidelines > and say what we should be doing, but when it comes down to actually doing > it, we're the ones in the hot seat and actually have to write it and > maintain it and debug it. kse based threads or async call gates or > whatever are almost certainly more efficient at runtime, but we've got to > get to the 'running' point first. A mathematical proof is no use to > somebody who wants threaded mysql or java or mozilla to work well. Neither > is an unstable thread library. At the end of the day working code is what > counts, and the more highly ambitious threading systems have to pay the > development, debugging and maintenence cost to get there. The libthr code would not have been possible, without the KSE kernel work which has already been done. Jeff acknowledged this at the time he posted the code for the implementation. At that point, all we are arguing is about who won the race to a userland implementation that at least works. But whatever userland library is there is only possible because of the KSE project efforts so far; e.g. the relationship is: ,-------------------------------------------------------. | | | | | libc_r | KSE pthreads | libthr | | | | |U |-------------------------------------------------------|- | | |K | Old kernel | KSE kernel | | | | `-------------------------------------------------------' > May the best code win! Of course. As it should be. 8-). -- Terry