All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Or Gerlitz <or.gerlitz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Flavio Baronti
	<f.baronti-ngIpsMLAhaq41k5uCYKmRQ@public.gmane.org>,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: Leak in rdma_get_cm_event on pthread_cancel?
Date: Mon, 16 Jan 2012 15:35:41 -0700	[thread overview]
Message-ID: <20120116223541.GA2892@obsidianresearch.com> (raw)
In-Reply-To: <CAJZOPZ+ik7DdXJHbEyr-PKyOQ3yEoWa6H=rhEe4cwc__61DUrQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Tue, Jan 17, 2012 at 12:15:23AM +0200, Or Gerlitz wrote:
> Flavio Baronti <f.baronti-ngIpsMLAhaq41k5uCYKmRQ@public.gmane.org> wrote:
> > what is then the proper way to stop a thread blocked on
> > rdma_get_cm_event() (or on ibv_get_cq_event())?
> 
> Oh, this is simple - don't get there... have your code
> 
> 1. get the FDs associated with IB - which you can retrieve from
> librdmacm and from libibverbs
> 
> 2. make them non blocking
> 
> 3. add them to you select/poll  FD group

4. Use an eventfd or otherwise to break out of the select/poll loop
and then exit your thread.

Jason
--
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

  parent reply	other threads:[~2012-01-16 22:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-13 11:46 Leak in rdma_get_cm_event on pthread_cancel? Flavio Baronti
     [not found] ` <4F101978.6010608-ngIpsMLAhaq41k5uCYKmRQ@public.gmane.org>
2012-01-13 16:43   ` Hefty, Sean
     [not found]     ` <1828884A29C6694DAF28B7E6B8A8237325676E37-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2012-01-13 16:55       ` Flavio Baronti
2012-01-13 17:59   ` Jason Gunthorpe
     [not found]     ` <20120113175925.GE6798-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2012-01-16  8:46       ` Flavio Baronti
     [not found]         ` <4F13E3ED.3010708-ngIpsMLAhaq41k5uCYKmRQ@public.gmane.org>
2012-01-16 22:15           ` Or Gerlitz
     [not found]             ` <CAJZOPZ+ik7DdXJHbEyr-PKyOQ3yEoWa6H=rhEe4cwc__61DUrQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-01-16 22:35               ` Jason Gunthorpe [this message]
     [not found]                 ` <20120116223541.GA2892-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2012-01-17  8:52                   ` Flavio Baronti

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=20120116223541.GA2892@obsidianresearch.com \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
    --cc=f.baronti-ngIpsMLAhaq41k5uCYKmRQ@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=or.gerlitz-Re5JQEeQqe8AvxtiuMwx3w@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.