On Sep 14, 2009, at 5:12 PM, Shaun Jackman wrote:
Two questions. Should the loop label recheck_request_status come before or after the call to opal_atomic_mb?
I believe that a 2nd mb is necessary. But I think it could be put into the "if" block at the end, and leave the label where it is. But see below.
Is it necessary to check request->req_state a second time, or is it only necessary to check request->req_complete the second time?
In THREAD_MULTIPLE, I guess the state could change. But in non- THREAD_MULTIPLE, it's superfluous to check a 2nd time because a request can't have changed into INACTIVE simply due to a call to opal_progress(). I notice that req_test.c checks the whole enchilada again (including the mb and state change). Since we're currently not distinguishing between THREAD_MULTIPLE and not in these functions, I think we need to be conservative and check the state again.
I think this means that our TEST/WAIT functions are not well-tuned for threading (or, at least, there are optimizations that could be made based on the thread level).
George / Brian -- got opinions here? -- Jeff Squyres jsquy...@cisco.com