All of lore.kernel.org
 help / color / mirror / Atom feed
From: Flavio Baronti <f.baronti-ngIpsMLAhaq41k5uCYKmRQ@public.gmane.org>
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: When is it safe to release connection resources?
Date: Thu, 29 Dec 2011 17:42:35 +0100	[thread overview]
Message-ID: <4EFC987B.6070901@list-group.com> (raw)

Hello,

I'm new to RDMA development and I have a question regarding resource release.
If I understood correctly, when ibv_get_cq_event returns, it holds some sort of lock over the completion queue, which is 
released when I call ibv_req_notify_cq. This lock is checked also in ibv_destroy_cq, so that:
1) When ibv_destroy_cq returns, I am certain that there is no thread running somewhere between ibv_get_cq_event and 
ibv_req_notify_cq
2) When ibv_destroy_cq returns, I am certain that ibv_get_cq_event will not return the destroyed cq any more.

Is all this correct?

Thanks
Flavio
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2011-12-29 16:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-29 16:42 Flavio Baronti [this message]
     [not found] ` <4EFC987B.6070901-ngIpsMLAhaq41k5uCYKmRQ@public.gmane.org>
2011-12-31 10:55   ` When is it safe to release connection resources? Bart Van Assche
2012-01-02 16:39   ` Hefty, Sean
     [not found]     ` <1828884A29C6694DAF28B7E6B8A8237325662B63-P5GAC/sN6hlcIJlls4ac1rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2012-01-04  9:42       ` Flavio Baronti
     [not found]         ` <4F041F19.1070608-ngIpsMLAhaq41k5uCYKmRQ@public.gmane.org>
2012-01-04 16:04           ` Hefty, Sean
2012-01-04 19:53       ` Bart Van Assche
     [not found]         ` <CAO+b5-qHFFg-KKQQkEZ2sS_+TWAFCJ0Ed4XGV15cs==_9zttSw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-01-04 20:05           ` Hefty, Sean
     [not found]             ` <1828884A29C6694DAF28B7E6B8A823732566B335-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2012-01-05 11:23               ` Bart Van Assche
     [not found]                 ` <CAO+b5-pk8v-1+STkYXmwTv2nKyQJcZd575dJW6Hipfo5_AchwA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-01-05 17:29                   ` Roland Dreier
     [not found]                     ` <CAL1RGDXtZA=6uvCE73isD7cu2=LU4b3CGPs4g7UMPmW=1xqgww-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-01-07  9:59                       ` Bart Van Assche

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EFC987B.6070901@list-group.com \
    --to=f.baronti-ngipsmlahaq41k5ucykmrq@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.