Strawman proposal: making libthr default thread implementation?
Daniel Eischen
deischen at freebsd.org
Mon Jul 3 11:48:45 UTC 2006
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
More information about the freebsd-threads
mailing list