4e0 Subj : Re: SMR hazard pointers w/o memory barrier To : comp.programming.threads From : Chris Thomasson Date : Thu Apr 14 2005 06:38 am > I think it could be done. Whether it should be done > is another question. You have to take into consideration that SMR is/can be used to prevent the ABA problem in certain lock-free algorithms; memory barriers might be a concrete requirement for the "original" SMR algorithm that "currently" exists... ;) This is because ABA detection has be performed at the "hazard pointer acquire" stage, "before", the lock-free algorithm even has a chance to use the hazard. This is shared to all threads interested in the lock-free algorithm, so you would have to use some sort of barriers... > The hazard ptr load is only about 3x slower than a raw > ptr load which is a lot faster than with a membar in > there. You mean an "uncontended" hazard pointer load... However, if you take into consideration that SMR is so "fine-grain" that the hazard pointer collisions, "retries" should really not be a problem. I am finding that SMR based reference counting can be a lot more light-weight than DWCAS based atomic_ptr ( depends on SMR "node" allocation scheme ). . 0