[openib-general] Re: uverbs comp events

Arlin Davis ardavis at ichips.intel.com
Wed Aug 17 18:02:36 PDT 2005


Roland Dreier wrote:

>    Arlin> Hi Roland, I just noticed that when I call
>    Arlin> ibv_close_device() it does not wakeup the poll cq_fd[0] in
>    Arlin> a separate thread. Can you take a look?
>
>OK, I'll see if there's something wrong.
>
>    Arlin> While we are on the subject. Any chance of getting
>    Arlin> something like ibv_generate_cq_event() added to wakeup
>    Arlin> events from user space?  Signaling, as a means to wake up
>    Arlin> my CQ (and CM or AT for that matter) processing thread,
>    Arlin> presents some problems. Unless of course, someone can show
>    Arlin> me a way to signal the FD directly from usersspace by
>    Arlin> another means.
>
>This doesn't seem useful to me.  Why not just use pipe() and write()
>to generate your own FD events?
>
>  
>
Sorry, I should have explained what I am trying to do. I have a separate 
CQ event processing thread that is created, during the uDAPL device 
open, to handle all event processing. The issue is that the CQ 
processing thread is blocking on the verbs cq_fd, waiting to process 
events for multiple connections/CQ's. When the application wishes to 
close the device it needs to wake up this thread, cleanup, and exit.

the options to wake up this blocking cq_fd and thread are:
  1. signal the thread with pthread_kill , pthread_cancel
  2. poll cq_fd with timeout, wakeup periodically and check for termination.
  3. ibv_close_device () to force interrupt on the polling cq_fd 
(problem I reported above)
  4. add new generate event call from verbs. (IB gen1 direct CQ objects 
supported this model)

In my opinion, option 4 is the best option unless someone can show me a 
better way to signal the cq_fd from userspace. Did I miss some options?

Thanks for looking into #3.

-arlin

> - R.
>
>  
>




More information about the general mailing list