Xinwei Hu wrote:
> 2007/8/9, Junko IKEDA <[EMAIL PROTECTED]>:
>> Hi,
>>
>> sorry, my previous answer was off the mark...
>> When 2 nodes reach there at the same time,
>> node A notices that the other node want to lock too, so give up lock itself.
> 
> I only see that you sleep a period of collision_timeout. This will not prevent
> race condition from happening.
> Am i missing anything else ?
> 
>> node B is ready to lock.

Sleeps won't prevent race conditions, unless you sleep in order to retry
from the beginning or something similar.  I guess I need to actually
read your code ;-)

There are some lockless synchronization algorithms which have been
published.  I would suggest comparing your code to those algorithms.

My colleague Paul McKenney would be a good person to ask about these, or
tell us where to go to learn more, so I've CCed him.

Paul:  I'll subscribe you to the list.  You can mark your subscription
as "do not send me mail" at any time.  You'll get the info for this in
the subscription email.

-- 
    Alan Robertson <[EMAIL PROTECTED]>

"Openness is the foundation and preservative of friendship...  Let me
claim from you at all times your undisguised opinions." - William
Wilberforce
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to