higher speed mutexes
Petri Helenius
pete at he.iki.fi
Thu Jan 6 07:36:56 GMT 2005
Hi,
I have some low-contention mutexes which I'm trying to make perform
better and I'm wondering if the current threading library does have some
primitives I could use or if I'm better off using atomic_cmpset_* and
pthread_yield() if the thread hit's contention (which should be about
1:10000 of the lock/unlock operation).
Any scheduling caveats from above, except obviously it would spin while
waiting for the lock. Most systems I plan on running this on have
dual-hypethreading CPU's.
I remember there were some discussion about dropping i386 compatible
support for mutexes and using atomic operations instead. Is there
code/compile time options for this on a branch I could check out and
give it a spin?
Pete
More information about the freebsd-threads
mailing list