[Linux-ha-dev] Shared disk file Exclusiveness
alanr at unix.sh
Thu Aug 9 08:46:11 MDT 2007
Xinwei Hu wrote:
> 2007/8/9, Junko IKEDA <ikedaj at intellilink.co.jp>:
>> 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 <alanr at unix.sh>
"Openness is the foundation and preservative of friendship... Let me
claim from you at all times your undisguised opinions." - William
More information about the Linux-HA-Dev