[openib-general] Re: uverbs comp events

Arlin Davis ardavis at ichips.intel.com
Fri Aug 19 10:59:14 PDT 2005


Roland Dreier wrote:

>    Arlin> the options to wake up this blocking cq_fd and thread are:
>    Arlin> 1. signal the thread with pthread_kill , pthread_cancel
>    Arlin> 2. poll cq_fd with timeout, wakeup periodically and check
>    Arlin> for termination.  3. ibv_close_device () to force interrupt
>    Arlin> on the polling cq_fd (problem I reported above) 4. add new
>    Arlin> generate event call from verbs. (IB gen1 direct CQ objects
>    Arlin> supported this model)
>
>    Arlin> In my opinion, option 4 is the best option unless someone
>    Arlin> can show me a better way to signal the cq_fd from
>    Arlin> userspace. Did I miss some options?
>
>I think you can just create a pair of FDs with pipe() and then sleep
>on both the cq_fd and your pipe fd using poll().  Then when you want
>to wake up the thread just write something into the other pipe fd.
>  
>

Yes, this is certainly another option; albeit one that requires more 
system resources. Why not take full advantage of the FD resource we 
already have? It's your call, but uDAPL and other multi-thread 
applications could make good use of a wakeup feature with these event 
interfaces. An event model that allows users to create events and get 
events but requires them to use side band mechanisms to trigger the 
event seems incomplete to me.

-arlin

> - R.
>
>  
>




More information about the general mailing list