From owner-freebsd-threads@FreeBSD.ORG Mon Jul 3 11:48:45 2006 Return-Path: X-Original-To: threads@freebsd.org Delivered-To: freebsd-threads@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7052116A4A0; Mon, 3 Jul 2006 11:48:45 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0CD6444368; Mon, 3 Jul 2006 11:48:44 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.6/8.13.6/NETPLEX) with ESMTP id k63Bmh5F026626; Mon, 3 Jul 2006 07:48:44 -0400 (EDT) Date: Mon, 3 Jul 2006 07:48:43 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Robert Watson In-Reply-To: <20060703101554.Q26325@fledge.watson.org> Message-ID: References: <20060703101554.Q26325@fledge.watson.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: threads@freebsd.org Subject: Re: Strawman proposal: making libthr default thread implementation? X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2006 11:48:45 -0000 On Mon, 3 Jul 2006, Robert Watson wrote: > > I know this has been discussed in the past, but I figured with 7.x trundling > forward, it was time to think about it again. In benchmarks for many common > applications and scenarios, libthr demonstrates significantly better > performance over libpthread -- this is not a coincidence, as David Xu has > invested a lot of time in improving libthr and application performance, and > libthr has benefitted significantly from the last ten years of threading work > on FreeBSD. libthr is also implemented across a larger number of our > platforms, and is already libpthread on several. The first recommendation we > make to MySQL and other heavy thread users is "Switch to libthr", which is > suggestive, also! Likewise, I know David has worked hard to eliminate > technical and standards obstacles that have been raised in the past. This > e-mail is a strawman proposal, intended to raise discussion, and possibly > lead to action. > > So the strawman proposal is: make libthr the default threading library on > 7.x. A few questions given the proposal: > > - Are there technical features present in libpthread that aren't yet in > libthr, and are required? In the past system/local thread support has been > the complaint, but I believe that is now long fixed. This is useful > regardless of a switch. Yes, you have to support PTHREAD_PRIO_PROTECT, PTHREAD_PRIO_INHERIT mutexes, and SCHED_RR, SCHED_FIFO, and SCHED_SPORADIC scheduling (hopefully not under the restriction that you are a privileged user). If you can those in libthr, I have no objection. However, these are not as easy to do in 1:1. -- DE