Subj : Re: Hazard Pointers w/o memory barrier. To : comp.programming.threads From : Joe Seigh Date : Fri May 27 2005 03:55 pm On Tue, 03 May 2005 22:31:49 -0400, Joe Seigh wrote: > On Tue, 03 May 2005 19:13:33 -0400, Joe Seigh wrote: > >> Hmm... signals thrash things up quite a bit. Things >> slow way down unless I put the polling interval up to >> 300 msec to spread the signaling out a bit. Then I >> get about 1,286,000 reads/sec/thread for RCU+SMR vs. >> 176,000 reads/sec/thread for RCU with the same polling >> interval. It's a little over 700 reads/sec/thread for >> mutexes or rwlocks. > > Ah wait, I must have been looking at the write rate. It > gets well over 500,000 reads/sec/thread at the default > poll interval, 50 msec. That's more reasonable. Now > to try it on Linux to see how it works there. Linux > signaling is preemptive I believe. > Using the Mach interface on OS X to query thread status slightly more than doubles the rate, so even on OS X doing a lot of signaling slows things down. Using the thread run state basically kills the read rate but that's because on a uniprocessor the other threads are always in a quiesce state, ie. not running, when you query them, so there's nothing to stop the writer threads from just finishing almost instantly before the reader threads do anything. -- Joe Seigh When you get lemons, you make lemonade. When you get hardware, you make software. .