atom feed16 messages in org.freebsd.freebsd-threadshigher speed mutexes
FromSent OnAttachments
Petri HeleniusJan 6, 2005 7:36 am 
Petri HeleniusJan 6, 2005 8:35 am 
David XuJan 6, 2005 8:49 am 
Petri HeleniusJan 6, 2005 9:15 am 
David XuJan 6, 2005 9:22 am 
Niall DouglasJan 7, 2005 10:46 am 
David XuJan 8, 2005 6:26 am 
Petri HeleniusJan 8, 2005 10:24 am 
David XuJan 10, 2005 4:07 pm 
Igor SysoevJan 16, 2005 1:38 pm 
David XuJan 18, 2005 6:12 am 
Julian ElischerJan 18, 2005 9:45 am 
David XuJan 18, 2005 3:41 pm 
Ivan VorasJan 18, 2005 3:46 pm 
Julian ElischerJan 18, 2005 4:18 pm 
David XuJan 19, 2005 3:20 am 
Subject:higher speed mutexes
From:David Xu (davi@freebsd.org)
Date:Jan 6, 2005 8:49:10 am
List:org.freebsd.freebsd-threads

I will have low overhead pthread library available soon, for simple mutex, it is only an atomic_cmpset_long() plus a function call (pthread_mutex_lock) overhead.

Petri Helenius wrote:

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?