3d9 Subj : Re: load-after-store reordering for x86 wrt smr... To : comp.programming.threads From : Joe Seigh Date : Tue Mar 15 2005 07:34 am On Mon, 14 Mar 2005 20:21:05 -0800, SenderX wrote: >>> Do you think that the store fence is needed in line 8: >>> >>> >> [...] >>> >>> >>> Line 7 would be the first store, line 9 would be the load-after-store >>> from >>> another location condition. It seems that smr requires explicit barriers >>> on >>> x86 to prevent the algorithm from crashing... >>> >>> >>> >> It has to be an mfence. sfence is just store/store. > > I made the change, and now as I expected... Iterating a huge linked-list > using hazard-pointers is more expensive than using a rw-mutex; you need a > fence for each item! It looks like proxy collectors are the way to go... > Fortunately, most architectures support dependent load memory ordering, otherwise you'd have to use load/load membars for them. -- Joe Seigh . 0