[openib-general] Another user mode issue

shaharf shaharf at voltaire.com
Thu Dec 9 03:44:08 PST 2004


Hi all,

 

            Another issue I want to raise concerning the umad access
library is some change indicators for the infiniband class objects - ca
& ports. It would be very nice if we could have a modification version
file for each just object. This will help the safe atomic reading and
caching of ca/port attributes.

 

The idea that when you want to read an object attributes you will do the
following:

1.       read the object version.

2.       read all object fields you want

3.       read the object version again

4.       if the new one is the same as the old one, we are done

5.       else the object was changed while reading, so go to step 2.

 

If you have cached the object you can compare the version each time the
object is accessed to check if re-read is required.

The version should be incremented upon any modification.

 

Of course this is not my idea - this is common method used in lock free
programming, and is similar to LL/SC (load linked, store conditional) or
C&S (compare and set) schemes.

 

Just as a long shot, it will be very nice to replace the switch state
change bit with this version based mechanism. Not only that it can be
used to implement atomic read, it can be used to let several distributed
SM's to safely scan the network. As a matter of fact it would also solve
the dual master synchronization problem we currently have (happens on
network merge - two masters sweeps the network, but one clears the
change bit before the other see it and it may end such that the SM with
the lesser priority waits for the other to take over, while the other
don't see it al all...).

This issue may be relevant for the distributed SM mentioned in the SOW.

 

Shahar

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20041209/32c49b54/attachment.html>


More information about the general mailing list