From: Bart Van Assche <bvanassche-HInyCGIudOg@public.gmane.org>
To: "Hefty, Sean" <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
yangfanlinux
<yangfanlinux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: ib_destroy_cm_id() versus cm callback race ?
Date: Sat, 28 Apr 2012 09:56:59 +0000 [thread overview]
Message-ID: <4F9BBEEB.40806@acm.org> (raw)
In-Reply-To: <1828884A29C6694DAF28B7E6B8A82373469D891F-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
On 04/27/12 17:18, Hefty, Sean wrote:
>> If I interpret the source code in drivers/infiniband/core/cm.c correctly
>> ib_destroy_cm_id() can return before an ongoing cm_id callback has
>> finished. Is this on purpose ? If not, isn't there a
>> flush_workqueue(cm.wq) call missing in cm_destroy_id() ?
>
> ib_destroy_cm_id() will block while there's an outstanding reference
> held on the id. We'll hold a reference on an id if we have any MAD
> outstanding against it (which can result in a send callback) or
> during the processing of a receive.
Hello Sean,
Thanks for the quick reply. Something else: I've noticed that the IB CM
work queue is created as follows:
cm.wq = create_workqueue("ib_cm");
That makes me wonder how it is prevented that two CM callbacks for the
same CM ID run concurrently on different CPUs ?
Thanks,
Bart.
--
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
next prev parent reply other threads:[~2012-04-28 9:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-27 15:57 ib_destroy_cm_id() versus cm callback race ? Bart Van Assche
[not found] ` <4F9AC1F2.5070007-HInyCGIudOg@public.gmane.org>
2012-04-27 17:18 ` Hefty, Sean
[not found] ` <1828884A29C6694DAF28B7E6B8A82373469D891F-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2012-04-28 9:56 ` Bart Van Assche [this message]
[not found] ` <4F9BBEEB.40806-HInyCGIudOg@public.gmane.org>
2012-04-30 18:29 ` Hefty, Sean
[not found] ` <1828884A29C6694DAF28B7E6B8A82373469FED01-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2012-04-30 19:04 ` Bart Van Assche
[not found] ` <4F9EE22A.4020000-HInyCGIudOg@public.gmane.org>
2012-04-30 19:27 ` Hefty, Sean
[not found] ` <1828884A29C6694DAF28B7E6B8A8237346A00D4A-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2012-05-01 7:19 ` 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=4F9BBEEB.40806@acm.org \
--to=bvanassche-hinycgiudog@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=yangfanlinux-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox