[openib-general] Re: OpenIB documentation
Roland Dreier
rdreier at cisco.com
Wed Mar 22 10:33:11 PST 2006
Christopher> Creating a thread is no problem. I notice that the
Christopher> queue data structures have pthread mutex locks and
Christopher> condition variables predefined; what is this for?
Christopher> Could I simply use pthread's synchronization
Christopher> primitives against these constructs? If so, are they
Christopher> already initialized during queue creation, or will I
Christopher> have to do that manually?
The verbs functions are completely thread-safe. The internal pthread
spinlocks and mutexes are hidden from the consumer, but no additional
synchronization is needed around any ibv_ calls.
Christopher> Getting back to ibv_get_cq_event(), what is it then
Christopher> that triggers a completion event?
When a completion entry arrives in a CQ that has been armed with
ibv_req_notify_cq().
Christopher> And finally, with regard to ibv_req_notify_cq(), just
Christopher> what does the second parameter mean? The example
Christopher> programme passes a 0 value for solicited_only; this
Christopher> is in a section that is relying on events. I'm
Christopher> totally confused by what is meant regarding "only
Christopher> solicited for notification."
solicited_only==0 means that any completion entry triggers an event;
solicited_only!=0 means that only solicited entries trigger an event.
See the verbs spec for the precise definition of which completions are
considered solicited.
- R.
More information about the general
mailing list