Date: Mon, 3 Jul 2006 07:48:43 -0400 (EDT) From: Daniel Eischen <deischen@freebsd.org> To: Robert Watson <rwatson@freebsd.org> Cc: threads@freebsd.org Subject: Re: Strawman proposal: making libthr default thread implementation? Message-ID: <Pine.GSO.4.64.0607030744030.5823@sea.ntplx.net> In-Reply-To: <20060703101554.Q26325@fledge.watson.org> References: <20060703101554.Q26325@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.64.0607030744030.5823>