Subj : Re: Atomic Ptr Plus (formerly known as NPTL2) To : comp.programming.threads From : Joseph Seigh Date : Sun Jan 23 2005 05:05 pm On Fri, 21 Jan 2005 09:48:09 -0500, Joseph Seigh wrote: > > The testcase has read threads traversing a linked list > while writer threads are concurrently modifying the list. > The testcase lets you vary the read and write rates to see > the effect on the different techniques (at this point just > RCU and mutex). I left rwlocks out because when I did > use them there really wasn't much difference between them > and mutexes when there is any appreciable modification. > Plus they don't seem to work on Linux yet. It looks like rwlocks work on my current Linux. They seem to perform well if there is no contention. I'm guessing they give reader preference since if a reader thread using the rwlock preempts, the testcase takes long enough that I ctl-C it. I'd say that unless write access in your application is extremely rare, rwlock is counter productive since it misleads you into believing that you will get better performance from it, whereas using a mutex will encourage you to take measures to reduce contention to improve performance. -- Joe Seigh .